django-q2
django-q2 copied to clipboard
Forking with threads can lead to deadlocks
It appears (from the DeprecationWarnings emitted) that django-q2 is mixing threads with os.fork(). Apparently, this is never safe to do and can lead to deadlocks (hence the DeprecationWarning): https://discuss.python.org/t/concerns-regarding-deprecation-of-fork-with-alive-threads/33555/2
Related, the django-q2 documentation currently states django-q2 cannot run on Windows except in sync mode, due to Windows not having os.fork().
Since django-q2 appears to work on Windows regardless, is the solution simply a matter of using "spawn" instead of "fork" when creating new processes?