[comp.windows.x] Is XLib reentrant?

hall@polya.Stanford.EDU (Keith A. Hall) (04/24/89)

I have multiple threads executing within a single Unix process.
The threads are (preemptively) time-sliced.  I have linked in the
necessary XLib routines.  My question is whether or not the XLib
routines are protected by monitors (implemented by busy-wait?), in
which case I can assume that a call to, say, XNextEvent can be
interrupted by another process which itself calls XNextEvent.

If XLib doesn't provide this kind of protection then I suppose I must
put a veneer atop each of the XLib routines which my program uses...

Any advice is appreciated.  Thank you.

Keith Hall
hall@eclipse.stanford.edu