[fpc-devel] cthreads OR adding a first unit

Michael Van Canneyt michael at freepascal.org
Fri May 27 23:16:01 CEST 2005



On Fri, 27 May 2005, Mattias Gaertner wrote:

> 
> Problem:
> Some units require the cthreads unit, but only under linux and it must be
> added as first unit to the main source.
> 
> Questions:
> Will the cthreads unit will be added as default someday under linux ?

No.

> Or will it become obsolete by some other unit/feature?

If someone implements native thread handling, then cthreads will be obsolete.


> Or will it stay this way: If you need threads under linux, you need to add
> cthreads as first unit?

For the time being, yes.

> Is it possible to compile a unit A, so that the need for cthreads is
> inherited to every unit using A? Some kind of extended -Fa flag with
> inheritage? 

Not that I know of; you can include cthreads in the gtk interface; 
normally this should then enable threads for all lazarus apps. 
The fact that it is not first in the uses clause is risky, but 
not too much.

Michael.




More information about the fpc-devel mailing list