]> git.ozlabs.org Git - ccan/commit
io: make poll fair, by rotating through fds and io_always() callbacks. master
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Oct 2025 03:37:53 +0000 (14:07 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 20 Oct 2025 03:53:24 +0000 (14:23 +1030)
commit5f219f03f6d650df52d18ecbc01d6d53ecea05d8
tree8883796775565d38f9d2b137433d06cfbbbe3014
parentc47bf0d9c405436d44eee5f06b6cbc78120cd089
io: make poll fair, by rotating through fds and io_always() callbacks.

In particular, if an fd defers work to an io_always(), it would get serviced immediately.
Now we rotate through, not only removing biassing to earlier fds but also interleaving
those io_always().

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/poll.c