Dima Tisnek added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27908>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to