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

Marek Chalupa mchqwerty at gmail.com
Fri Dec 5 05:03:28 PST 2014


On 3 December 2014 at 17:04, Daniel Stone <daniel at fooishbar.org> wrote:

> Hi,
>
> 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.
>

Well, to be precise -- they are valid but have no effect (according to man
pages).
Fixed, thanks :)


>
> 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
> else.
>

Yeah, that sounds reasonable. I swapped these parts and also changed the
example code a little bit.



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

Thanks,
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141205/7f986f83/attachment.html>


More information about the wayland-devel mailing list