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

2011-05-03 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

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

2011-05-03 Thread patrick vrijlandt
patrick vrijlandt added the comment: I agree. Please close the ticket. Thanks, Patrick 2011/5/3 Raymond Hettinger > > Raymond Hettinger 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 un

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

2011-05-03 Thread Raymond Hettinger
Raymond Hettinger 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 increment could occur somewhere

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

2011-05-03 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2011-05-03 Thread patrick vrijlandt
New submission from patrick vrijlandt : 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 during task_done()! Additional