diff --git a/README.md b/README.md index d7ee0605..8ba2167b 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,9 @@ Options: GRANIAN_WORKERS; default: 1; x>=1] --threads INTEGER RANGE Number of threads [env var: GRANIAN_THREADS; default: 1; x>=1] + --blocking-threads INTEGER RANGE + Number of blocking threads [env var: + GRANIAN_BLOCKING_THREADS; default: 1; x>=1] --threading-mode [runtime|workers] Threading mode to use [env var: GRANIAN_THREADING_MODE; default: workers] diff --git a/granian/cli.py b/granian/cli.py index 05c24691..cda0aa6f 100644 --- a/granian/cli.py +++ b/granian/cli.py @@ -30,6 +30,7 @@ def main( websockets: bool = typer.Option(True, '--ws/--no-ws', help='Enable websockets handling', show_default='enabled'), workers: int = typer.Option(1, min=1, help='Number of worker processes'), threads: int = typer.Option(1, min=1, help='Number of threads'), + blocking_threads: int = typer.Option(1, min=1, help='Number of blocking threads'), threading_mode: ThreadModes = typer.Option(ThreadModes.workers.value, help='Threading mode to use'), loop: Loops = typer.Option(Loops.auto.value, help='Event loop implementation'), loop_opt: bool = typer.Option(False, '--opt/--no-opt', help='Enable loop optimizations', show_default='disabled'), @@ -130,7 +131,7 @@ def main( interface=interface, workers=workers, threads=threads, - pthreads=threads, + pthreads=blocking_threads, threading_mode=threading_mode, loop=loop, loop_opt=loop_opt,