Replies: 1 comment
-
The uring backend has a fixed sized submission and completion queue, defined here: In order to submit a system call, we must first get a submission queue entry to fill in with the details: If we couldn't get a This can in fact yield the current fiber to implement a form of internal queue load balancing, i.e. if you have too many fibers trying to submit system calls, they will start to yield and try again later (on the next iteration of the run loop): Followed by: https://github.com/socketry/event/blob/master/ext/event/selector/selector.c#L172-L193 This code puts the current fiber into the event selector's ready list, and on the next iteration of the event loop it will be resumed, which is done by https://github.com/socketry/event/blob/master/ext/event/selector/selector.c#L257-L278 This ensures that the interface will correctly handle any arbitrary number of tasks without overloading the |
Beta Was this translation helpful? Give feedback.
-
What if there are way more tasks produced than consumed?
Beta Was this translation helpful? Give feedback.
All reactions