glommio
glommio copied to clipboard
sleep by `poll`ing an eventfd
We no longer link the rings at all. Instead, we register an eventfd on the rings (that is written to by the kernel each time a CQE is posted) and we poll on that instead.
It simplifies the sleeping procedure quite a bit at the expense of
adding one (nonblocking) read
syscall per reactor trip.
I've confirmed with @vmingchen that this fixes the hangs he sees when running unit tests. I suspect this will also resolve the occasional hangs in CI we have experienced. If so, I am delighted.