Anyone else experience Thread.join() returning early?

Michael Hobbs mike at hobbshouse.org
Mon Jan 31 15:48:13 EST 2005


I just wanted to see if anyone else experienced a problem with the
Thread.join() method in Python 2.4. Unfortunately, I did not debug this
problem fully before re-writing my code to avoid Thread.join(). 

My specific situation was that I called subprocess.Popen() to spawn a
separate process with the stdout redirected to a pipe. I then created
a Thread to process the data coming through the pipe. The thread would
terminate when it encountered EOF on the pipe.

When I used Thread.join(), I would encounter symptoms that lead me to
believe that join() was returning before the subprocess actually
terminated. After I rewrote the code to manually manipulate a lock
instead of using Thread.join(), the symptoms went away.

I guess that I'm just curious to see if anyone else has encountered a
problem here, so that a bug can be filed if necessary. I did a quick
Google search, but didn't see any other reports.

Thanks,
- Mike



More information about the Python-list mailing list