Hi Zac, There's no problem with creating multiple processes from the CreateProcess() function. I've created 1000's of child processes from this API call without issues in the past.
I think the issue relates to the way the win32 fork function is using the win32 threads. On WIN NT4 based OS's there is limitation on the number Thread Local Storage (TLS) entries per process. What that number is not clear to me, but I guess it must be 64 on WinXP! See http://msdn2.microsoft.com/en-us/library/6yh4a9k1(VS.71).aspx for more information on TLS and http://home.att.net/~raffles1/win32_faq.htm#more_than_64_dlls for a comment of the limitations of TLS. I'm guessing that entries are being created for each fork call (i.e. with TlsAlloc) however once the forked child has exited and the thread is 'cleaned' up, the TLS entry is not deallocated (i.e. with TlsFree) so the static storage runs out. I would agree that if there were more than 64 simultaneous threads working away a new process would need to be created. I guess where I'm at is can POE::Wheel:Run be re-implemented with some other process/thread spawning logic other than the win32 emulated fork (which seems to be very buggy in terms memory and thread management). Or can I use some other logic to make a non-blocking call to a function in an external Perl package which takes Perl reference data structures. Thanks Jeremy >>> "Zack Payton" <[EMAIL PROTECTED]> 26/06/2007 14:22 >>> There is a limitation within win32 limits a single process from creating more than 64 processes, however, there is nothing to limit the processes that you create from creating their own child processes. With a little hackery you could use master slave model in which the master creates slaves that each manage up to 64 children each. This would allow you to pass the CreateProcess() limitation. Z ______________________________________________________________________________________________________ This message contains information, which is confidential and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or [EMAIL PROTECTED]) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank you. ______________________________________________________________________________________________________