Eric Pouech pouech-eric@wanadoo.fr writes:
- we maintain on the client side whether there's still some pending
async op on the current thread (this is needed in optimizing some wait operations)
That part doesn't look right, you clear the flag when removing the last async operation on an fd, but this bears no relation to the number of async operations in the current thread.
It seems to me this could instead be done entirely on the client side, since we need to allocate and free an async structure for each operation we should be able to maintain a counter of them on the client side.