[vox-tech] Xlib event loop

Julie Russell vox-tech@lists.lugod.org
Fri, 19 Dec 2003 11:47:00 +1100


Hi Everyone,

I am programming in c++ and xlib using common c++ threads. I want to sleep a
thread (which I have initiated as detached). During that process I want to
recieve events from the xlib event loop and if triggered, interrupt the
sleeping thread, or if not interrupted, have the thread wake up on it's own
after 20 seconds. The problem is, while that thread is asleep, for some
reason, my event loop appears to be blocked. How can I sleep a thread so
that the loop doesn't block and then interrupt it cleanly. Why does the xlib
event loop appear to be blocked during this process.

Thanks in advance,
Julie.