Skip to content

Commit

Permalink
Add 'abandon_on_cancel' to to_thread.run_sync
Browse files Browse the repository at this point in the history
A new parameter name was added
https://trio.readthedocs.io/en/stable/history.html#id15

And cancellable is now deprecated and causes a warning, so remote the
old parameter name.
  • Loading branch information
Hnasar committed Sep 24, 2024
1 parent 0936804 commit 3646ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trio-stubs/to_thread.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ def current_default_thread_limiter() -> trio.CapacityLimiter: ...
async def run_sync(
sync_fn: Union[Callable[..., _T], Callable[[VarArg()], _T]],
*args: Any,
cancellable: bool = False,
abandon_on_cancel: bool = False,
limiter: Optional[trio.CapacityLimiter] = None,
) -> _T: ...

0 comments on commit 3646ca4

Please sign in to comment.