[PATCH wayland v3 2/2] client: update documentation about threading

Daniel Stone daniel at fooishbar.org
Wed Dec 3 08:04:03 PST 2014


On 3 December 2014 at 14:53, Marek Chalupa <mchqwerty at gmail.com> wrote:

> + *   fds[0].fd = wl_display_get_fd(display);
> + *   fds[0].event = POLLIN | POLLHUP | POLLERR;

POLLHUP and POLLERR are not valid for fds[0].events (note spelling); they
can be returned in revents if these events happened, but you don't
explicitly select for them.

Other than that, these look good to me, with the caveat that it might be
nice to invert the order of prepare_read()'s documentation: currently it
talks about the problem the function solves, and only later goes on to
explain the pattern you should actually use. It would be nice to just
explain what to do, and only later explain why you shouldn't do anything

Thanks for doing this! It's super-helpful, and magically resolves one of
the things on my post-it TODO note. ;)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141203/417db996/attachment.html>

More information about the wayland-devel mailing list