Spencer Nelson added the comment:
Josh,
> Making literally every await equivalent to:
>
> await asyncio.sleep(0)
>
> followed by the actual await (which is effectively what you're proposing when
> you expect all await to be preemptible) means adding non-trivial o
Spencer Nelson 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,
Change by Spencer Nelson :
--
keywords: +patch
pull_requests: +23243
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24433
___
Python tracker
<https://bugs.python.org/issu
New submission from Spencer Nelson :
I am writing some software that reads records from a very large file (~hundreds
of GB), putting them in an `asyncio.Queue` as it goes, and a chain of consumers
handle each record and do stuff over the network.
To my surprise, my program runs out of memory