I have a program that needs to create a great deal of threads. Unfortunately, I cannot seem to find a way to lower the 1MB default stack size per thread. The threading module does not seem to support setting the stack size explicitly. I have 1GB of memory on my system so I can only create about 1000 threads before I receive the following error trace:
File "C:\Python24\lib\threading.py", line 442, in __bootstrap
self.run()
File "C:\Python24\lib\threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\tagent\globalModule.py", line 190, in shell
self.target()
File "C:\tagent\agent.py", line 132, in runLoop
self.timeSliceEvent(currentTime,delta)
File "C:\tagent\agent.py", line 397, in timeSliceEvent
actorInstance.threadStart()
File "C:\tagent\agent.py", line 117, in threadStart
threading.Thread.start(self)
File "C:\Python24\lib\threading.py", line 416, in start
_start_new_thread(self.__bootstrap, ())
error: can't start new thread
Any ideas on how to lower the stack size?
Chad
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32