Allow passing `allow_overruns: bool` to `Services.start_service_task()`

master
Tyler Goodlet 2023-05-13 16:51:11 -04:00
parent b572cd1b77
commit 2e8268b53e
1 changed files with 2 additions and 0 deletions

View File

@ -56,6 +56,7 @@ class Services:
name: str, name: str,
portal: tractor.Portal, portal: tractor.Portal,
target: Callable, target: Callable,
allow_overruns: bool = False,
**ctx_kwargs, **ctx_kwargs,
) -> (trio.CancelScope, tractor.Context): ) -> (trio.CancelScope, tractor.Context):
@ -81,6 +82,7 @@ class Services:
with trio.CancelScope() as cs: with trio.CancelScope() as cs:
async with portal.open_context( async with portal.open_context(
target, target,
allow_overruns=allow_overruns,
**ctx_kwargs, **ctx_kwargs,
) as (ctx, first): ) as (ctx, first):