diff --git a/docs/changelog.rst b/docs/changelog.rst index 80a74785..51cdd2df 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -222,6 +222,10 @@ Core Library to a function call, where the reply might be dropped due to exceeding the maximum configured message size. +* :gh:issue:`624`: the number of threads used for a child's auto-started thread + pool has been reduced from 16 to 2. This may drop to 1 in future, and become + configurable via a :class:`Router` option. + * :gh:commit:`a5536c35`: avoid quadratic buffer management when logging lines received from a child's redirected standard IO. diff --git a/mitogen/service.py b/mitogen/service.py index c8022c04..6bd64eb0 100644 --- a/mitogen/service.py +++ b/mitogen/service.py @@ -55,7 +55,6 @@ except NameError: LOG = logging.getLogger(__name__) -DEFAULT_POOL_SIZE = 16 _pool = None _pool_pid = None #: Serialize pool construction. @@ -88,7 +87,7 @@ def get_or_create_pool(size=None, router=None): _pool = Pool( router, services=[], - size=size or DEFAULT_POOL_SIZE, + size=size or 2, overwrite=True, recv=mitogen.core.Dispatcher._service_recv, )