Skip to content

Commit

Permalink
docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Bazhal committed Jun 20, 2019
1 parent af3e102 commit ba34911
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kopf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class WorkersConfig:
""" How many workers can be running simultaneously on per-object event queue. """

synchronous_tasks_threadpool_limit: Optional[int] = None # if None, calculated by ThreadPoolExecutor based on cpu count
""" How many threads in total can be running simultaneously to handle any non-async tasks. """
""" How many threads in total can be running simultaneously to handle any non-async tasks."""

worker_idle_timeout: float = 5.0
""" How long does a worker can idle before exiting and garbage-collecting."""
Expand All @@ -133,6 +133,9 @@ def get_syn_executor() -> concurrent.futures.ThreadPoolExecutor:

@staticmethod
def set_synchronous_tasks_threadpool_limit(new_limit: int):
"""
Call this static method at any time to change synchronous_tasks_threadpool_limit in runtime.
"""
if new_limit < 1:
raise ValueError('Can`t set threadpool limit lower than 1')

Expand Down

0 comments on commit ba34911

Please sign in to comment.