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 pitrou
Recipients Tamas.K, csernazs, grahamd, jcea, ncoghlan, neologix, pitrou, python-dev, tim.peters
Date 2013-09-05.08:15:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> It would be much nicer to have an approach that worked for all thread users, 
> not just threading.Thread users.  For example, a user can easily (well,
> plausibly) get into the same kinds of troubles here by calling
> _thread.start_new_thread() directly, then waiting for their threads "to end" 
> before letting the program finish - they have no idea either when their
> tstates are actually destroyed.

The _thread module is a private API these days, I wouldn't worry too much about that. Are there reasons *not* to use the threading module (except CPython bootstrap issues that normal users should have no bother about)? Also, how would they wait for the thread to end, except by triggering their own Event object?

> So the new `waittime` _may_ be negative, in which case we've already timed
> out (but passing a negative `waittime` to acquire() means "wait as long as 
> it takes to acquire the lock").  So this block should return if waittime < 0.

Thanks, good point :-o

As for the is_alive() method, mmh, ok, it needs to be tweaked too. That will make the patch more interesting.
Date User Action Args
2013-09-05 08:15:11pitrousetrecipients: + pitrou, tim.peters, jcea, csernazs, ncoghlan, grahamd, neologix, python-dev, Tamas.K
2013-09-05 08:15:11pitrousetmessageid: <>
2013-09-05 08:15:11pitroulinkissue18808 messages
2013-09-05 08:15:10pitroucreate