Deadlock with logging multiprocess/multithread python script
I am facing the problem with collecting logs from the following script. Once I set up the SLEEP_TIME to too "small" value, the LoggingThread threads somehow block the logging module. The script freeze on logging request in the action function. If the SLEEP_TIME is about 0.1 the script collect all log messages as I expect. I tried to follow this answer but it does not solve my problem. import multiprocessing import threading import logging import time SLEEP_TIME = 0.000001 logger = logging.getLogger() ch = logging.StreamHandler() ch.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %