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

Hans-Peter Diettrich DrDiettrich1 at aol.com
Mon Oct 10 11:48:18 CEST 2011


Michael Schnell schrieb:
> On 10/09/2011 03:14 PM, Michael Van Canneyt wrote:
>> It's not so on Unix. X-Windows is definitely not thread-safe.
> Of course "in general" this is correct.
> 
> But I understand that it should be possible that an application (using 
> additional threads) creates more than one "Main Frame" by attaching to a 
> new "instance" of the Widget set and thus - regarding the GUI - acts as 
> multiple applications,

You cannot have multiple instances of an widgetset, and not multiple 
(different) widgetsets in one application.

What should be feasable are windows (forms) in more than only the main 
thread, when every thread uses its own message queue. Then a worker 
thread could e.g. update its progress indicator, in his own form, 
without blocking (or being blocked by) the main thread.

DoDi





More information about the Lazarus mailing list