[Lazarus] Threads and Libraries (dll and so)
Michael Van Canneyt
michael at freepascal.org
Tue Feb 4 11:12:19 CET 2014
On Tue, 4 Feb 2014, Michael Schnell wrote:
> I stumbled over this:
>
> http://tronche.com/gui/x/xlib/display/XInitThreads.html
>
> So Xlib is thread aware and they seem to suggest that it dopes make sense to
> create multiple X sessions (i.e. one per thread) in a single program.
Thread aware does not necessarily mean thread-safe.
>
> (And I learned that in fact XInitThreads() can be called in Lazarus projects.
> ->
> http://lists.lazarus.freepascal.org/pipermail/lazarus/2013-January/078799.html
> )
>
> So in fact X does support multiple "!GUIs" (e.g. one per thread) in a
> multithreadded project.
>
> Of course it might be that QT (or KDE) impose additional restrictions (though
> I still suppose that this can be handles somehow).
I think you should read
http://tronche.com/gui/x/xlib/display/XLockDisplay.html
It kind of defeats the purpose, as it suggests that only 1 thread at a time
can access the display.
Michael.
More information about the Lazarus
mailing list