[fpc-pascal] Re: Strange issue with threads

Luca Olivetti luca at ventoso.org
Tue Aug 23 23:54:28 CEST 2011


Al 23/08/11 22:46, En/na rzbhatti ha escrit:
> I followed the bug report 
> http://bugs.freepascal.org/view.php?id=13798
> and it says that it is resolved and closed. 
> 
> I am using fpc 2.4.4 on Windows XP. Like Luca Olivetti I am trying to create
> 256 threads, but it chocks at 121 saying :
> 
> An unhandled exception occurred at $0041099C :
> EThread : Failed to create new thread, code:8
> 
> I could not find the details of the actual resolution of this bug. Please
> help...

The bug is actually solved: now you see an exception when a thread
cannot be created (before the bug was solved you couldn't know if the
thread was successfully created or not).

As per the solution to the maximum number of threads, you can look here:

http://stackoverflow.com/questions/481900/whats-the-maximum-number-of-threads-in-windows-server-2003

it seems the limit is due to the available memory and the stack used
by each thread.

Bye
-- 
Luca



More information about the fpc-pascal mailing list