Using Xlib in multithread enviroment
Deron.Johnson at Sun.COM
Tue Sep 7 09:46:02 PDT 2004
Amir Bukhari wrote:
>>On Friday I had pretty much come to the conclusion that Xlib
>>is NOT multithread safe, even when XInitThreads is called.
>>I talked to a developer on the AWT team and he confirmed this.
>>He said that none of the extension functions are thread safe
>>and that there are problems with the predicate functions.
> the peoble of Xorg has said to me that libX11 in the freedesktop CVS is
> thread safe. the x11 lib with monolotic Xorg is not.
> could we use it?
Not without difficulty. At this point, I don't think that the thread
safety of Xlib is causing our problems. The only two components in the
Display Server using Xlib are AWT and FWS. And I have (in my own
workspace) properly synchronized the two by having FWS grab the AWT
display lock prior to making any Xlib calls. But this didn't work.
So I think something else is going on.
More information about the xorg