ask/celery — pull request #502 by harmv (2011-10-13 13:04:50+00:00)
Title: Renewed fix for deadlock (ticket #496)

Renewed fix for deadlock (ticket #496)
https://github.com/ask/celery/issues/496
Work around for http://bugs.python.org/issue6721#msg140215
in short: python logging module uses RLock() objects. These are
broken after a fork.

* The previous fix (14c23c4) did
not solve the problem.
1 now really call the re-init of the logging system _every_ fork.
(moved init code to worker function)
2 Add initialisation of 2 more locks. (root logger and logging
global lock)

this patch survived 30 hours of stress testing. (before it would deadlock in 2-10 hours)