From 8182fe9c927c8ba1053cf649bf222a1b5be2c837 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Sun, 13 Mar 2022 00:37:06 -0800 Subject: [PATCH] Make --use-threads default and update release notes Re: issue Hanging on Random Files #814 --- docs/release_notes.rst | 7 +++++++ src/ocrmypdf/cli.py | 8 +++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index 04ee67f9..dab243a2 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -12,6 +12,13 @@ may be unreliable. Use the API to depend on precise behavior. The public API may be useful in scripts that launch OCRmyPDF processes or that wish to use some of its features for working with PDFs.. +v13.4.1 +======= + +- Temporarily make threads rather than processes the default executor worker, due + to a persistent deadlock issue when processes are used. Add a new command line + argument ``--no-use-threads`` to disable this. + v13.4.0 ======= diff --git a/src/ocrmypdf/cli.py b/src/ocrmypdf/cli.py index b211f9d0..17f54e56 100644 --- a/src/ocrmypdf/cli.py +++ b/src/ocrmypdf/cli.py @@ -228,7 +228,13 @@ Online documentation is located at: help=argparse.SUPPRESS, ) jobcontrol.add_argument( - '--use-threads', action='store_true', help=argparse.SUPPRESS + '--use-threads', action='store_true', default=True, help=argparse.SUPPRESS + ) + jobcontrol.add_argument( + '--no-use-threads', + action='store_false', + dest='use_threads', + help=argparse.SUPPRESS, ) metadata = parser.add_argument_group(