Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Hmm, I think I know what happens. t_bootstrap() in threadmodule.c calls
the self.__bootstrap() method in the Thread object, and it is this
method which sets the __stopped flag at its end, which in turns wakes up
the join() method.

The problem is that at this point, t_bootstrap() still (rightly) holds a
reference to the Thread object, since it has a reference to its
__bootstrap() method which is still running. Depending on how the
operating system switches threads, this reference may or may not be
released when the join() method returns.

So I think it's the test that is flaky. Instead of calling the join()
method, it should wait for the OS-level thread to finish. Or it should
find another way of testing for the reference cycle.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2496>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to