<div dir="ltr">By now, I'm completely lost.<div><br></div><div style>xcb_block_until_event() is called xcb_wait_for_event() as far as I know. The non-blocking version is xcb_poll_for_event(), but it's almost always a bad idea to call it.</div>

<div style><br></div><div style>As Josh suggests, if you want to wait on multiple things at once, spawn a blocking thread per thing, and demux the result using the usual thread mechanisms. Pipes are probably overkill here: just use a locked queue. If you use a semaphore for locking the queue, you can block until something is in it conveniently.</div>

<div style><br></div><div style>--Bart</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 1:27 AM, Christian Heller <span dir="ltr"><<a href="mailto:christian.heller@tuxtax.de" target="_blank">christian.heller@tuxtax.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Josh,<br>
<div class="im"><br>
> You don't need to get a character to block on a terminal or serial port.<br>
> You should just select() or poll() or epoll() or similar on the file<br>
</div>[..]<br>
<br>
Thanks indeed for all those various ideas of yours!<br>
<br>
It will take me some time to think them through and adapt CYBOI's<br>
event handling architecture, for better performance.<br>
<div class="im"><br>
> OK, glad to hear that blocking would work for you.<br>
><br>
> Ideally I'd still love to have some way for XCB to just supply a file<br>
> descriptor you can block on, but I don't know if the structure of the X<br>
> protocol would reasonably allow that.  Failing that, an<br>
> xcb_block_until_event or xcb_wait_for_event_noret or similar call seems<br>
> vaguely reasonable.<br>
<br>
</div>Perhaps you could put my email in the corresponding bug/feature request,<br>
so that I get informed in case such a function gets added?<br>
<br>
Thanks again<br>
<span class="HOEnZb"><font color="#888888">Christian<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Xcb mailing list<br>
<a href="mailto:Xcb@lists.freedesktop.org">Xcb@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/xcb" target="_blank">http://lists.freedesktop.org/mailman/listinfo/xcb</a><br>
</div></div></blockquote></div><br></div>