[fpc-pascal] Threads

Paul Davidson pdavidson at coraxnetworks.com
Fri Oct 28 15:27:02 CEST 2005

On Oct 28, 2005, at 9:12, Michael Van Canneyt wrote:

> On Fri, 28 Oct 2005, Paul Davidson wrote:
>> Would it be possible to add a property to TThreads to expose 
>> DefaultStackSize in rtl/inc/threadh.inc
>> Or something similar.
> It should be possible, yes, however this will require that the stack
> size is added to the constructor: the constructor calls beginthread.

This makes sense.  Much as other thread properties are usually done in 
constructor as well.

> But we'll need also to change the BeginThread call itself, because
> it will need the stacksize as an (optional) parameter.
> This can (and probably should) be done, but that will not make it in 
> the
>> Working on app that uses lots of complex recursion.  Ran into 
>> problems and ended rewriting this component.  In order to meet stack 
>> size limit, program runs much slower.
>> Comments please?
> For the time being, the easiest is to set the thread manager to your 
> own
> thread manager, and set the stack yourself in the BeginThread function.
> However, this will create all threads with the same size.

In this case it is acceptable

> Michael.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
P Davidson
Corax Networks Inc.

More information about the fpc-pascal mailing list