On Wed, Mar 24, 2010 at 3:52 PM, Alexandre Julliard julliard@winehq.org wrote:
Mike Kaplinskiy mike.kaplinskiy@gmail.com writes:
Hope this makes the rationale a bit clearer. Although admittedly the patch does allow for some busy waiting since if (mask & FD_READ || async_waiting( sock->read_q )) ev |= POLLIN | POLLPRI; should be more like if ( (mask & FD_READ && !async_busy( sock->read_q )) || async_waiting( sock->read_q )) ev |= POLLIN | POLLPRI; which probably should've went into #3.
Should I merge 2&3 and resend?
I think there's more to it than merging them. If you have to ignore events you are doing something wrong, because you shouldn't get the events in the first place.
Well we wouldn't be ignoring them, just not using them for FD_READ/FD_WRITE. We need POLLIN/POLLOUT when we have pending asyncs, but we shouldn't set FD_READ/FD_WRITE every time we get a POLLIN/POLLOUT since these events were needed by the overlapped operations.
Mike.