Issue 25642: Setting maxsize breaks asyncio.JoinableQueue/Queue (original ) (raw ) Issue25642
Created on 2015-11-17 00:37 by Chris Seto , last changed 2022-04-11 14:58 by admin . This issue is now closed .
Files
File name
Uploaded
Description
Edit
test.py
Chris Seto,2015-11-17 00:37
Example code snippet that crashes
Messages (3)
msg254773 - (view)
Author: Chris Seto (Chris Seto) *
Date: 2015-11-17 00:37
When maxsize is set on a JoinableQueue/Queue and the queue is full (maxsize <= len(queue)) _put is called rather than __put_internal. __put_internal increments _unfinished_tasks but _put does not. Whenever using maxsize in a Queue calling task_done will almost always cause a ValueError('task_done() called too many times').
msg254776 - (view)
Author: Chris Seto (Chris Seto) *
Date: 2015-11-17 00:44
Looks to be fixed in python 3.6
msg254777 - (view)
Author: Guido van Rossum (gvanrossum) *
Date: 2015-11-17 01:02
Should also be fixed in the next 3.4/3.5 releases. We rewrote the guts of the Queue class to be much simpler. See https://github.com/python/asyncio (specifically, https://github.com/python/asyncio/commit/872597ba12953849cc6893042fd044073b87f870 ).
History
Date
User
Action
Args
2022-04-11 14:58:23
admin
set
github: 69828
2016-04-16 20:27:55
berker.peksag
set
status: open -> closedtype: crash -> behaviorstage: resolved
2015-11-17 01:02:09
gvanrossum
set
messages: +
2015-11-17 00:44:43
Chris Seto
set
resolution: fixedmessages: +
2015-11-17 00:37:33
Chris Seto
create