Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2005-05

cthreads OR adding a first unit

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

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 ? Or will it become obsolete by some other unit/feature? Or will it stay this way: If you need threads under linux, you need to add cthreads as first unit?
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?

Mattias

Reply by email

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
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.

Reply by email

Florian Klaempfl
to Michael Van Canneyt
Michael Van Canneyt wrote 38 lines
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.

It must not be first the unit but before classes and variants.

Reply by email