From a90b9e669fb2b33591d260c407203375c697d59b Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Fri, 9 Apr 2021 13:22:48 -0700 Subject: [PATCH] Add reminder to not mess with pool/listener order --- src/ocrmypdf/builtin_plugins/concurrency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ocrmypdf/builtin_plugins/concurrency.py b/src/ocrmypdf/builtin_plugins/concurrency.py index fd26e373..74b3500f 100644 --- a/src/ocrmypdf/builtin_plugins/concurrency.py +++ b/src/ocrmypdf/builtin_plugins/concurrency.py @@ -117,7 +117,8 @@ class StandardExecutor(Executor): initializer = process_init # Regardless of whether we use_threads for worker processes, the log_listener - # must be a thread + # must be a thread. Make sure we create the listener after the worker pool, + # so that it does not get forked into the workers. listener = threading.Thread(target=log_listener, args=(log_queue,)) listener.start()