Spencer Nelson <swnel...@uw.edu> added the comment:

Thanks for testing on more Python versions.

Yes, adding asyncio.sleep(0) after each put is an effective workaround - it's 
certainly possible to manually yield like that. I just think that that's what 
asyncio.Queue.put ought to be doing - in fact, that's my proposed change in the 
associated PR: 
https://github.com/python/cpython/pull/24433/files#diff-22a6bcb03e783378149a3e9411c185b13c908e61886ffd55145634b7ab12caacR141

I suppose that, more broadly, I would have expected that _any_ `await f()` call 
would be a preemptible point, but I think that's a much, much larger discussion.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43119>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to