[Lazarus] making multithreading more user friendly

Mattias Gaertner nc-gaertnma at netcologne.de
Sun Apr 29 12:18:06 CEST 2012


On Sun, 29 Apr 2012 00:04:32 +0200
Giuliano Colla <giuliano.colla at fastwebnet.it> wrote:

> Il 28/04/2012 19:26, Mattias Gaertner ha scritto:
> > On Sat, 28 Apr 2012 11:43:31 +0200
> > Giuliano Colla<giuliano.colla at fastwebnet.it>  wrote:
> [..]
> >> The problem arises from TThread being in fpc rtl, which is of course
> >> unaware of Lazarus needs.
> > This is not Lazarus specific.
> > A console application gets the same error.
> >
> >
> >> [...]
> >> constructor TCDX11TimerThread.Create(CreateSuspended: Boolean;
> >>     const StackSize: SizeUInt);
> >> var
> >>     thisTM: TThreadManager;
> >> begin
> >>     GetThreadManager(thisTM);
> >>     if not Assigned(thisTM.InitManager) then begin
> >>       Raise Exception.Create
> >>       ('You must define UseCThread (-dUseCThreads in Project Options->   Compiler Options) in order to run this program!');
> >>       end;
> >>     inherited Create (CreateSuspended);
> >>     [..]
> >>
> >> A LazThread class defined in LCL which wraps  TThread and performs
> >> appropriate checks could be a solution?
> > The above check can be used to improve the semaphore message of the RTL.
> >
> IOW you mean that the issue can/should be submitted to the fpc list?

Yes

Mattias




More information about the Lazarus mailing list