[issue30847] asyncio: selector_events: add_urgent() for urgent data to read, 3rd argument of select.select()

Pim Klanke report at bugs.python.org
Thu Jul 6 06:22:25 EDT 2017


Pim Klanke added the comment:

> "Let's say that we got read event on sockets A and B (in an ordered list from selectors: A, then B), but B gets urgent data: should we handle B urgent data before not-urgent A data?"

IMO No. The same strategy applies. urgent data events on B have priority over other events on B, but not necessarily over events on A. As long as the urgent data events for a certain file object are handled before other events for that file object, it should be fine.

> "Would it be possible to let the developer decide how to prioritize events?"
At this point asyncio has no support for prioritizing event handlers. If prioritizing should be necessary, it should IMO be implemented in a way that all event handlers can be prioritized and not just these events. I think we can agree that this falls outside the scope of this patch.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30847>
_______________________________________


More information about the Python-bugs-list mailing list