PSA: GLX is not thread safe, even if you use XLockDisplay()/XUnlockDisplay(). Xlib-XCB does not fix this. First Google result on this is a wrong Stack Overflow answer. GLX uses lots of per-process (not per-display) globals. You must use a process-wide lock around each GLX call.
-
-
Your escapades here remind me of the Joe Armstrong chapter in Coders at Work about interfacing with X11 from Erlang. :)https://books.google.com/books?id=2kMIqdfyT8kC&pg=PA211&lpg=PA211&dq=joe+armstrong+%22x+windows%22+coders+at+work&source=bl&ots=Mm9rqfFJyD&sig=ACfU3U1mAfSNa9kEk55pf74TBmiOzNHhrQ&hl=en&sa=X&ved=2ahUKEwiKioiBwvzlAhUdHzQIHdEGCVUQ6AEwAHoECAsQAg#v=onepage&q=joe%20armstrong%20%22x%20windows%22%20coders%20at%20work&f=false …
-
Unfortunately I can't use that solution. There are two original sins: 1. GLX is an *Xlib* standard, not an X protocol standard as it should be. 2. NVIDIA being proprietary means I have to code to GLX and can't just bypass this nonsense with GBM.
- 20 more replies
New conversation -
-
-
But that library can’t actually be 100% safe, right? Another library could be using GLX using its own lock, or someone could even be using two different versions of your own library at the same time.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.