Message135063
| Author |
patrick.vrijlandt |
| Recipients |
patrick.vrijlandt |
| Date |
2011年05月03日.19:30:07 |
| SpamBayes Score |
5.430401e-06 |
| Marked as misclassified |
No |
| Message-id |
<1304451008.79.0.490801283429.issue11987@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 note:
Personally, I would like the increment to occur *before* instead of *after* _put(). This is because I would like to be able to implement a _put() that does not put everything. This put should be able to undo the increment. As it is, calling task_done() from put might decrease the counter to zero inadvertently. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年05月03日 19:30:08 | patrick.vrijlandt | set | recipients:
+ patrick.vrijlandt |
| 2011年05月03日 19:30:08 | patrick.vrijlandt | set | messageid: <1304451008.79.0.490801283429.issue11987@psf.upfronthosting.co.za> |
| 2011年05月03日 19:30:08 | patrick.vrijlandt | link | issue11987 messages |
| 2011年05月03日 19:30:07 | patrick.vrijlandt | create |
|