Skip to content

Commit

Permalink
fixup 39f7625: get queue type from mp.get_ctxt
Browse files Browse the repository at this point in the history
  • Loading branch information
bertsky committed Feb 11, 2025
1 parent 39f7625 commit 7456714
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/ocrd/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# this is where the fixes came from:
from loky import Future, ProcessPoolExecutor
import multiprocessing as mp
from queue import Queue # mp.queues.Queue does not behave with logging.handlers.QueueListener
from threading import Timer
from _thread import interrupt_main

Expand Down Expand Up @@ -519,7 +518,7 @@ def process_workspace(self, workspace: Workspace) -> None:

if max_workers > 1:
executor_cls = ProcessPoolExecutor
log_queue = Queue()
log_queue = mp.get_context('fork').Queue()
else:
executor_cls = DummyExecutor
log_queue = None
Expand Down

0 comments on commit 7456714

Please sign in to comment.