[Lazarus] making multithreading more user friendly

Giuliano Colla giuliano.colla at fastwebnet.it
Sun Apr 29 00:04:32 CEST 2012


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?

Giuliano






More information about the Lazarus mailing list