[Lazarus] Are multiple critical sections allowed in form or data module?

Michael Schnell mschnell at lumino.de
Mon Oct 10 10:23:26 CEST 2011


On 10/09/2011 10:49 AM, Hans-Peter Diettrich wrote:
>
> The LCL is not reentrant. All code accessing the LCL should run in the 
> main thread (see Synchronize...), not in other threads.
Not true in this intensity.

There are functions in the LCL especially doe not be called by worker 
Threads, and there are certain functions in the LCL that can be called 
by the main threads and by worker thread.

Moreover there are complicated cases (Like TList in the RTL the 
functions of which are only "thread save" when the threads don't use the 
same instance, while TThreadList is documented to be always thread save.)

-Michael




More information about the Lazarus mailing list