[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-04 Thread patrick vrijlandt
patrick vrijlandt patrick.vrijla...@gmail.com added the comment: I agree. Please close the ticket. Thanks, Patrick 2011/5/3 Raymond Hettinger rep...@bugs.python.org Raymond Hettinger raymond.hettin...@gmail.com added the comment: This line should be protected by acquiring the

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-04 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11987 ___

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-03 Thread patrick vrijlandt
New submission from patrick vrijlandt patrick.vrijla...@gmail.com: Line 154 in standard library's queue.py, in the definition of Queue.put() is: self.unfinished_tasks += 1 This line should be protected by acquiring the all_tasks_done lock. Theoretically, the increment could occur somewhere

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-03 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11987 ___

[issue11987] queue.Queue.put should acquire mutex for unfinished_tasks

2011-05-03 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com added the comment: This line should be protected by acquiring the all_tasks_done lock. All of three of the condition variables share the same underlying lock. The increment occurs only with the lock has been acquired. Theoretically, the