Message163162
Yes, another correct observation. This can if a thread is interrupted in between releasing the mutex and waiting for the semaphore.
I see no way around this apart from manually creating event objects for every thread.
Personally I'm not sure it is a wise guarantee to make. The shift has been away from "handover" semantics towards "retry" semantics for locking in general over the last few years, particularly with the rise of multiprocessing. But this distinction should be made clear and I will make sure to document it. Thanks for pointing this out. |
|
Date |
User |
Action |
Args |
2012-06-19 13:26:31 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, loewis, paul.moore, pitrou, vstinner, python-dev, sbt |
2012-06-19 13:26:31 | kristjan.jonsson | set | messageid: <1340112391.22.0.515101190977.issue15038@psf.upfronthosting.co.za> |
2012-06-19 13:26:30 | kristjan.jonsson | link | issue15038 messages |
2012-06-19 13:26:30 | kristjan.jonsson | create | |
|