[Lazarus] GTK2 threading

Anton Kavalenka anton.k at tut.by
Tue Jan 22 18:52:31 CET 2013


Dear Lazarus developers!

I'm examining the problem disturbing me for years.

GTK2 applications provide thread-safety using internal mutexes passed 
through gdk_thread_init()
And it works.

Pure X-Applcation does so (orders X-messages per-thread) using 
XInitThreads at early start of application.
And it also works

But GTK Widgetset uses pure Xlib calls for determining keyboard states.
Xlib thread-safety is not initialized in GTK2 widgetset.

IMO the problem half-way to resolve - either not use Xlib calls (pure 
GTK2,3 - it is threadsafe) or make GTK and Xlib interoperable.
Or block GTK calls until Xlib call returned.

with best regards,
Anton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130122/9babc062/attachment-0002.html>


More information about the Lazarus mailing list