Author: Richard Plangger <planri...@gmail.com>
Date: 2016-10-14 10:19 +0200
Log: recreate the lock after forking, otherwise the state of the lock
will not let the child progress
diff --git a/pypy/module/thread/os_lock.py b/pypy/module/thread/os_lock.py
@@ -153,13 +153,11 @@
state is finalized (after it is untied from the interpreter).
This is a private API for the threading module."""
- # see issue 18808. We need to release this lock just before exiting
- # the any thread!
+ # see issue 18808. We need to release this lock just before exiting any
ec = space.getexecutioncontext()
- lock = ec._sentinel_lock
- if lock is None:
- lock = Lock(space)
- ec._sentinel_lock = lock
+ # after forking the lock must be recreated! forget the old lock
+ lock = Lock(space)
+ ec._sentinel_lock = lock
pypy-commit mailing list