Antoine Pitrou added the comment: It's not only the _active_limbo_lock. All global structures of the threading module should be reinitialized (including the _MainThread instance); for that purpose, reload() can be used. I attach an example which exercises this problem. Normally the script should hang in the last step (using os.fork() and launching threads while some other threads call threading.enumerate() in a loop).
The safe_fork() function in the example is a replacement for os.fork() which tries to avoid any deadlock in the threading module. If it's deemed useful and bug-free, it could perhaps be added somewhere in the stdlib (in the threading module itself perhaps). ---------- nosy: +pitrou Added file: http://bugs.python.org/file9288/fork_threading.py ____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue874900> ____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com