This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Import this first, before *anything* else, if you are using `multiprocessing` | |
directly or indirectly and you encounter "freezing" when any threaded code uses | |
things like NumPy, OpenCV, etc. | |
This should only be be necessary when using the "fork" start method; other methods | |
should (hopefully) work fine without it: | |
https://docs.python.org/3.6/library/multiprocessing.html#contexts-and-start-methods | |
For more information, see: | |
https://stackoverflow.com/questions/17053671/python-how-do-you-stop-numpy-from-multithreading # noqa |