> > I'm looking at optimizing it but I don't fully understand the relationship
> > between aio_prepare and WaitForMultipleObjects. Do they get the same set of
> > events?
> 
> After some reading I think WaitForMultipleObjects is for event notifiers and
> aio_prepare is for select() on fd events.
> It's a bit trickier than aio-posix, in the first iteration there could be
> another event masking ctx->notifier so we don't know if we need to clear it.
> Maybe we can reverse events[] so that ctx->notifier will be the 0th one. And I
> think we can always remove it after first iteration, am I right?

Yes, that would work. I am not sure how complex it would be. You would also need
a solution for the GSource and one (probably similar to aio-posix) for your
epoll implementation. With ctx->notified at least you can encapsulate it in
aio_notify_accept...

Stefan, any preferences?

Paolo

Reply via email to