# patroni.thread_pool module

class patroni.thread_pool.PatroniThreadPoolExecutor(max_workers: int, **kwargs: Any)

  Bases: `ThreadPoolExecutor`

  __init__(max_workers: int, **kwargs: Any) → None

    Initializes a new ThreadPoolExecutor instance.

    Parameters:

      - max_workers – The maximum number of threads that can be used to execute the given calls.

      - thread_name_prefix – An optional name prefix to give our threads.

      - initializer – A callable used to initialize worker threads.

      - initargs – A tuple of arguments to pass to the initializer.

      - ctxkwargs – Additional arguments to cls.prepare_context().

patroni.thread_pool.__executor: PatroniThreadPoolExecutor

patroni.thread_pool.configure_global_pool(max_workers: int) → None

patroni.thread_pool.get_executor() → ThreadPoolExecutor