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

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sun Oct 9 16:50:47 CEST 2011

Michael Van Canneyt schrieb:
> On Sun, 9 Oct 2011, Hans-Peter Diettrich wrote:
>> Mattias Gaertner schrieb:
>>> On Sun, 09 Oct 2011 10:49:31 +0200
>>> Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>>>> [...]
>>>> The LCL is not reentrant. 
>>> Most LCL code is reentrant.
>> Only within the context of an single thread.
>> This was acceptable on traditional single-CPU/core machines, but 
>> nowadays non-visual components, and also parts of a GUI, should be 
>> manageable in different (dedicated) threads.
> It's not so on Unix. X-Windows is definitely not thread-safe.
> I also have not seen any claims from Microsoft that the GDI controls are 
> thread-safe,

True, widgetsets typically are not threadsafe, that's not the problem. 
Remember an recent thread, where e.g. a progress bar could be attached 
to and served by an thread, independently from the main application GUI. 
  The same for data modules...


More information about the Lazarus mailing list