[Python-ideas] Async API: some code to review
shibturn at gmail.com
Mon Oct 29 14:13:15 CET 2012
On 28/10/2012 11:52pm, Guido van Rossum wrote:
> I'm most interested in feedback on the design of polling.py and
> scheduling.py, and to a lesser extent on the design of sockets.py;
> main.py is just an example of how this style works out in practice.
What happens if two tasks try to do a read op (or two tasks try to do a
write op) on the same file descriptor? It looks like the second one to
do scheduling.block_r(fd) will cause the first task to be forgotten,
causing the first task to block forever.
Shouldn't there be a list of pending readers and a list of pending
writers for each fd?
More information about the Python-ideas