[issue6643] Throw away more radioactive locks that could be held across a fork in threading.py

Reid Kleckner report at bugs.python.org
Mon Jul 12 17:11:30 CEST 2010


Reid Kleckner <rnk at mit.edu> added the comment:

I completely agree, but the cat is out of the bag on this one.  I don't see how we could get rid of fork until Py4K, and even then I'm sure there will be people who don't want to see it go, and I'd rather not spend my time arguing this point.

The only application of fork that doesn't use exec that I've heard of is pre-forked Python servers.  But those don't seem like they would be very useful, since with refcounting the copy-on-write behavior doesn't get you very many wins.

The problem that this bandaid solves for me is that test_threading.py already tests thread+fork behaviors, and can fail non-deterministically.

This problem was exacerbated while I was working on making the compilation thread.

I don't think we can un-support fork and threads in the near future either, because subprocess.py uses fork, and libraries can use fork behind the user's back.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6643>
_______________________________________


More information about the Python-bugs-list mailing list