[fpc-pascal] Why is cthreads unit not included by default

Mattias Gärtner nc-gaertnma at netcologne.de
Thu Aug 27 13:46:21 CEST 2009

Zitat von Henry Vermaak <henry.vermaak at gmail.com>:

> 2009/8/27 Graeme Geldenhuys <graemeg at opensoft.homeip.net>:
>> Michael Van Canneyt wrote:
>>>> Why is threading enabled by default under Windows and not under other
>>>> platforms?
>>> Because it creates a dependency on the C library, which
>>> is not always wanted. For Lazarus programs, the dependency exists
>>> anyway, so it does not make a lot of sense to have the define.
>> But surely that c library is available on all unix-type systems? To why
>> is that dependency a bad thing?
> The linux threading support is part of glibc.  See `man pthreads`.
> That's why Mattias says that including it by default in lazarus is
> o.k., since all the widgetsets depend on libc, anyway.

Not me, but Michael said that.
I would say, that using cthreads under Linux in an LCL app is ok.
I didn't test yet a LCL app under OS X, *BSD or Sparc, so  don't know  
if cthreads has a performance penalty there.

> Threading on Windows works with Windows API functions.


More information about the fpc-pascal mailing list