[issue874900] threading module can deadlock after fork
Antoine Pitrou
report at bugs.python.org
Tue Jul 15 20:33:52 CEST 2008
Antoine Pitrou <pitrou at free.fr> added the comment:
> I still don't like the _after_fork() implementation. Its O(n) where n
> == number of threads the parent process had.
It may be O(n) but the inner loop looks very cheap. Even with n == 1000
I'm not sure it would make a difference.
However, are you sure the system thread identifier stays the same after
a fork? I see that in _after_fork() you reuse the old ident for
new_active instead of getting it from get_ident().
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue874900>
_______________________________________
More information about the Python-bugs-list
mailing list