[xcb] XCB polling and single-threadedness
Bart Massey
xcb@nickle.org
Sat, 06 Jul 2002 14:38:26 -0700
Sorry it's taken me so long to get back to you!
As Jamey suggests, IMHO callbacks are the wrong model for
reply data even in the single-threaded case. When you need
reply data, you need the data, and are willing to block for
it: before that you shouldn't block, and don't even in the
current model.
OTOH, for events, XCB seems to me to be lacking. AFAIK there
is no way in the current API to do a non-blocking poll for
an event, just XCBWaitEvent(). If you had XCBPollEvent()
(that did the non-blocking read from the wire until it was
empty, and then returned the first available event if any),
you could build your own event callback mechanism atop XCB.
Maybe you or Jamey or Andy or Adam could implement
XCBPollEvent(). Much of the machinery is actually already
there...
Bart Massey
bart@cs.pdx.edu