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

Pekka Paalanen ppaalanen at gmail.com
Tue Dec 9 08:09:32 PST 2014


On Fri, 5 Dec 2014 14:03:28 +0100
Marek Chalupa <mchqwerty at gmail.com> wrote:

> 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. ;)

Both patches pushed. I took the liberty to add R-b Daniel, too. Awesome.


Thanks,
pq


More information about the wayland-devel mailing list