msg297652 - (view) |
Author: Pim Klanke (pklanke) * |
Date: 2017-07-04 13:51 |
depends on bpo-30844 |
|
|
msg297653 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-07-04 13:54 |
Please elaborate the description :-) |
|
|
msg297654 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-07-04 13:55 |
Does the Windows Proactor event loop has a similar concept of "excepter"? |
|
|
msg297655 - (view) |
Author: Pim Klanke (pklanke) * |
Date: 2017-07-04 14:15 |
To be able to use GPIO Sysfs Interface with asyncio on our embedded platforms, we require exceptional event support in asyncio. depends on bpo-30844 |
|
|
msg297722 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-07-05 09:24 |
In the selectors issue, we discussed how an application should prioritize "urgent" events: http://bugs.python.org/issue30844#msg297707 While I now agree that it's not the role of selectors to decide, I would like to discuss the plan for asyncio. 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? Would it be possible to let the developer decide how to prioritize events? How does Twisted or Node.JS handle urgent data? |
|
|
msg297765 - (view) |
Author: Guido van Rossum (gvanrossum) *  |
Date: 2017-07-05 15:09 |
How do you define "urgent data"? Is this just the third category of select(), Read, Write, Exceptional? I don't know if that should be considered urgent, it's just "out of band" IIRC. |
|
|
msg297809 - (view) |
Author: Pim Klanke (pklanke) * |
Date: 2017-07-06 07:07 |
This is in fact the third catagory of select(), "exceptional conditions", but because some find the term "exceptional" confusing when used in a Python module, we decided to use the term "urgent data", borrowed from the poll(2) man page. (see bpo-30844) An example of an exceptional conditions event is "out of band", another one is edge detection from GPIO Sysfs Interface. The patch for fulfilling this issue can and will be supplied if and when bpo-30844 is merged. 30844 originally also contained the patch to asyncio, but I was asked to split it into two separate patches. |
|
|
msg297821 - (view) |
Author: Pim Klanke (pklanke) * |
Date: 2017-07-06 10:22 |
> "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. |
|
|
msg297823 - (view) |
Author: STINNER Victor (vstinner) *  |
Date: 2017-07-06 11:22 |
Ok, it makes sense. Thanks :-) |
|
|