wreq.runtime
Runtime configuration for asynchronous and blocking clients. Runtime is also
available as wreq.Runtime.
wreq.runtime.Runtime
Shared Tokio runtime whose workers start when constructed.
Clients, responses and active work keep it alive; the last owner releases it automatically. No-steal clients keep a fixed worker, without CPU pinning.
Source code in python/wreq/runtime.py
__init__
__init__(*, workers=None, work_steal=True, thread_name=None, max_blocking_threads=None, thread_keep_alive=None)
Thread counts must be positive; thread_keep_alive is a nonnegative timedelta.
workers defaults to available CPU parallelism, or 1 if unavailable. work_steal=True uses a multi-thread pool; False uses independent single-thread workers. thread_name defaults to the package name, "wreq-python". Thread names cannot contain NUL characters. Blocking-pool settings apply to each worker runtime in no-steal mode. None preserves Tokio's blocking-pool defaults.