On Sun, 9 Oct 2011, Hans-Peter Diettrich wrote:
Mattias Gaertner schrieb:
On Sun, 09 Oct 2011 10:49:31 +0200
Hans-Peter Diettrich <[email protected]> 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,
and according to
http://stackoverflow.com/questions/2798812/net-controls-why-arent-all-calls-thread-safe
it is simply not thread safe, some exceptions aside.
The argument put forward there is a sane one: only the programmer can meaningfully
decide on the granularity of the needed marshalling. A framework never can do that.
Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus