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.