[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

Yury Selivanov report at bugs.python.org
Thu Aug 6 22:08:22 CEST 2015


Yury Selivanov added the comment:

> Honestly, I've lost track of the queue design. Maybe the push-back on cancellation is just wrong? After all, if a coroutine has received an item, it's out of the queue, even if it gets cancelled before it can do anything with the item.

I think the push-back is a right thing.  At least, I wouldn't expect ``wait_for(queue.get(), 0.1)`` code to lose queue items *sometimes* in big codebases.

----------

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


More information about the Python-bugs-list mailing list