This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dima.Tisnek
Recipients Dima.Tisnek, rooter, tim.peters
Date 2016-09-13.20:31:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473798699.81.0.733184971266.issue27908@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-09-13 20:31:39Dima.Tisneksetrecipients: + Dima.Tisnek, tim.peters, rooter
2016-09-13 20:31:39Dima.Tisneksetmessageid: <1473798699.81.0.733184971266.issue27908@psf.upfronthosting.co.za>
2016-09-13 20:31:39Dima.Tisneklinkissue27908 messages
2016-09-13 20:31:39Dima.Tisnekcreate