[Xcb] Introduce new API-function xcb_consume_data

Thomas Hunger hto at arcor.de
Tue Aug 7 05:20:48 PDT 2007


Please just ignore this post. I am sorry.

I just saw that poll_for_event calls _xcb_in_read as well...
The wakeup came from buggy code elsewhere.

On Tuesday 07 August 2007, Thomas Hunger wrote:
> Hello,
>
> when I use poll/select to wait for new events I use
>
>   ev = xcb_poll_for_event(c);
>
> to retrieve new events.
>
> Now it is possible that there is no new event in the queue
> (ev == NULL) but still data that can be read, causing my select to
> wake up all the time.
>
> _xcb_conn_wait calls _xcb_in_read which reads as much data as
> possible so that the next select doesn't wake up immediatly.
> I would like to introduce a new API-call
>
>   xcb_consume_data(c);
>
> which reads until select would block again.
>
> I could run xcb in an extra thread and use wait_for_event, but I
> have some reasons why I don't want to do that right now (maybe
> later).
>
> What do you think?
>
> Tom
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb




More information about the Xcb mailing list