Snakepit.PythonThreadLimits (Snakepit v0.6.10)
View SourceNormalizes Python threading configuration with safe defaults.
Resolves partial overrides pulled from application environment and produces a complete map ready for runtime consumption.
Summary
Types
@type t() :: %{ optional(:openblas) => pos_integer(), optional(:omp) => pos_integer(), optional(:mkl) => pos_integer(), optional(:numexpr) => pos_integer(), optional(:grpc_poll_threads) => pos_integer() }
Thread limit configuration keyed by known library identifiers.
Functions
@spec defaults() :: t()
Default thread limit configuration.
Merge a user-supplied configuration with defaults.
Accepts nil, maps with atom keys, or keyword lists.
Unknown keys are ignored; non-integer values are coerced with String.to_integer/1
when possible.