News for hackers. Stuff that matters.
Re:Linux: What Can You Epoll? by remram on Saturday October 22, 2022 @08:57PM (#33303571)
> The thread receiving that event then takes ownership of the per-job epoll until the event queue is empty.

What do you mean by that? Take that per-job epoll out of the outer epoll?

Re:Linux: What Can You Epoll? by kentonv on Saturday October 22, 2022 @09:45PM (#33303806)
I'm handwaving a little because I haven't actually built something like this yet.

But I imagine you'd add the per-job epoll to the global epoll with EPOLLONESHOT, so that once an event is reported, it is unregistered with the global epoll. Whatever thread received that event then owns the job. When that thread decides there's nothing more to do, it adds the job epoll back to the global epoll with EPOLLONESHOT again.