[Lazarus] Threads in Lazarus code base

Vincent Snijders vincent.snijders at gmail.com
Wed Sep 15 11:42:58 CEST 2010

2010/9/15 Juha Manninen (gmail) <juha.manninen62 at gmail.com>:
> Question: why is there need for "UseCThreads" define. Isn't cthreads needed
> always when using a *nix system? So, can I change the definition to :
>  cthreads,
>  {$ENDIF}
> If I now commit my code as it is, there will be complaints from people who run
> the converter under Linux for example.

By default Lazarus is a single threaded application. Only if a lazarus
packages that uses threads is used, the IDE needs to include the
cthreads unit. Such packages add -dUseCThreads in their usage options
(Open package, Options -> Usage -> Add options to dependent packages
and projects -> Custom).

So, no, it is not always needed, until now, only if a third party
package requires it. I would think twice about making this change.


More information about the Lazarus mailing list