[issue6721] Locks in python standard library should be sanitized on fork

2012-06-02 Thread Tomaž Šolc
Changes by Tomaž Šolc tomaz.s...@tablix.org: -- nosy: -avian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing

[issue6721] Locks in python standard library should be sanitized on fork

2011-07-05 Thread Tomaž Šolc
Tomaž Šolc tomaz.s...@tablix.org added the comment: Except for multiprocessing, does anyone know of any other module in the standard library that uses fork() and threads at the same time? After some grepping through the source I couldn't find any other cases. I'm still in favor of just

[issue6721] Locks in python standard library should be sanitized on fork

2011-07-05 Thread Tomaž Šolc
Tomaž Šolc tomaz.s...@tablix.org added the comment: We can't do that, it would break existing code. I would argue that such code is already broken. What do you mean by helper threads? multiprocessing uses threads behind the scenes to handle queue traffic and such for individual forked

[issue6721] Locks in python standard library should be sanitized on fork

2011-06-30 Thread Tomaž Šolc
Tomaž Šolc tomaz.s...@tablix.org added the comment: The way I see it is that Charles-François' patch trades a possibility of a deadlock for a possibility of a child process running with inconsistent states due to forcibly reinitialized locks. Personally, I would rather have an occasional

[issue6721] Locks in python standard library should be sanitized on fork

2011-06-30 Thread Tomaž Šolc
Tomaž Šolc tomaz.s...@tablix.org added the comment: You mean a runtime warning? That would be ugly and clumsy. A warning is probably a good idea, but it should be added somewhere in os.fork() and threading documentation. I was thinking about a run time warning that is emitted if you call

[issue7123] Multiprocess Process does not always exit when run from a thread.

2011-06-25 Thread Tomaž Šolc
Tomaž Šolc tomaz.s...@tablix.org added the comment: I am pretty sure this is another instance of issue 6721. multiprocessing is forking a new process and if that happens while the other thread is holding the lock for stdout, the process will deadlock because the lock state is replicated

[issue6721] Locks in python standard library should be sanitized on fork

2011-06-25 Thread Tomaž Šolc
Changes by Tomaž Šolc tomaz.s...@tablix.org: -- nosy: +avian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing