In our previous episode, Graeme Geldenhuys said:
> uses
>   {$IFDEF UNIX}{$IFDEF UseCThreads}
>   cthreads,
>   {$ENDIF}{$ENDIF}
>   Classes;
> ---------------
> 
> Question 1:
>   Is there an alternative implementation of multi-threading support for
> Unix-type systems -- other than the cthreads unit?

Not.
 
> Question 2:
>   If not, then why do we have the extra "IFDEF UseCThreads" define in
> the uses clause?

In case you don't use threads and want to make a static binary.
 
> Why can't we just have the following...? By default Windows programs and
> OS/2 programmes have multi-threading support compiled in, why don't we
> do the same for Unix-type systems? I often get the "program not compiled
> with multi-threading support" error and have to constantly define the
> UseCThreads option.

Because the API model of Unix is totally different from Windows and OS/2.

I do think that if Lazarus has separate templates for "LCL app" and "general
app" that the ifdef could disappear from the LCL app, since that is never
static anyway.
 
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to