Login  Register

Re: Turning off XInitThreads

Posted by gouessej on Sep 17, 2012; 10:37am
URL: https://forum.jogamp.org/Turning-off-XInitThreads-tp4026119p4026197.html

Sven Gothel wrote
Well, a quick review showed that it is not possible to easily
drop the multithreading requirements of XLib, b/c:
  - We reuse display connections in NEWT which
    maybe used from multiple threads. X11 locking is quite fast here,
    since usually xcb is being utilized as the backend.
    Simply removing XInitThreads()
    (even though no explicit XLockDisplay/.. is in place) will cause havoc.
    xcb_ actually detects concurrent access and aborts JOGL in this case.
Why do we reuse display connections in NEWT? Is the creation of such a connection very expensive?
Julien Gouesse | Personal blog | Website