Skip to content

Commit fc17a22

Browse files
authored
tweak to_thread docs about abandon_on_cancel (#1088)
1 parent 7996218 commit fc17a22

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/threads.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ To run a (synchronous) callable in a worker thread::
2525
run(main)
2626

2727
By default, tasks are shielded from cancellation while they are waiting for a worker
28-
thread to finish. You can pass the ``cancellable=True`` parameter to allow such tasks to
28+
thread to finish. You can pass the ``abandon_on_cancel=True`` parameter to allow such tasks to
2929
be cancelled. Note, however, that the thread will still continue running – only its
3030
outcome will be ignored.
3131

src/anyio/to_thread.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ async def run_sync(
3232
"""
3333
Call the given function with the given arguments in a worker thread.
3434
35-
If the ``cancellable`` option is enabled and the task waiting for its completion is
36-
cancelled, the thread will still run its course but its return value (or any raised
37-
exception) will be ignored.
35+
If the ``abandon_on_cancel`` option is enabled and the task waiting for its
36+
completion is cancelled, the thread will still run its course but its
37+
return value (or any raised exception) will be ignored.
3838
3939
:param func: a callable
4040
:param args: positional arguments for the callable

0 commit comments

Comments
 (0)