MacOS 10.9.2: threading error using python.org 2.7.6 distribution

Ned Deily nad at acm.org
Fri Apr 25 14:58:56 EDT 2014


In article 
<CAPTjJmpXuj9N3cdQcH0oJaVkSfVrqJWHH1GSt3FafkcGyw54Ag at mail.gmail.com>,
 Chris Angelico <rosuav at gmail.com> wrote:

> On Fri, Apr 25, 2014 at 11:43 PM, Matthew Pounsett
> <matt.pounsett at gmail.com> wrote:
> > If I insert that object into the test code and run it instead of 
> > MyThread(), I get the error.  I can't see anything in there that should 
> > cause problems for the threading module though... especially since this 
> > runs fine on another system with the same version of python.
> >
> > Any thoughts on what's going on here?
> 
> First culprit I'd look at is the mixing of subprocess and threading.
> It's entirely possible that something goes messy when you fork from a
> thread.

FWIW, the Python 2 version of subprocess is known to be thread-unsafe.  
There is a Py2 backport available on PyPI of the improved Python 3 
subprocess module:

http://bugs.python.org/issue20318
https://pypi.python.org/pypi/subprocess32/

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list