issue #627: reduce the default pool size in a child to 2.

Ansible has no blocking services running, or really any service that
would have an outsized benefit from multiple IO waiters. Probably we
only need 1, but let's start with 2 just in case.
new-serialization
David Wilson 5 years ago
parent 5d6e20bc21
commit 4caca80962

@ -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.

@ -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,
)

Loading…
Cancel
Save