2.7. Using Xlib With Threads
On systems that have threads, support may be provided to permit
multiple threads to use Xlib concurrently.
To initialize support for concurrent threads, use
XInitThreads().
To lock a display across several Xlib calls, use
XLockDisplay().
To unlock a display, use
XUnlockDisplay().
Christophe Tronche, ch@tronche.com