Message276337
Your logic is accurate; _started is in fact separate from _limbo.
As such taking a lock for "test-then-set" only would suffice.
Now when you bring the other primitive under this lock in one place, it would look cleaner if it was also brought in the other.
There's one more issue with proposed change:
Before the change, if "already started" exception is ever raised for a given Thread object, then it's guaranteed that that object was started successfully.
With the change, it is possible that exception is raised, and thread fails to start, leaving the object in initial state.
If it were up to me, I would buy this limitation as price of safety.
Someone may disagree. |
|
Date |
User |
Action |
Args |
2016-09-13 20:31:39 | Dima.Tisnek | set | recipients:
+ Dima.Tisnek, tim.peters, rooter |
2016-09-13 20:31:39 | Dima.Tisnek | set | messageid: <1473798699.81.0.733184971266.issue27908@psf.upfronthosting.co.za> |
2016-09-13 20:31:39 | Dima.Tisnek | link | issue27908 messages |
2016-09-13 20:31:39 | Dima.Tisnek | create | |
|