Skip to content

Commit a58fb65

Browse files
authored
Refresh doc on "CancellationToken" support (#436)
1 parent 0df8ba3 commit a58fb65

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docs/async_support.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The generated C# method will have this signature:
1717

1818

1919
```csharp
20-
public async Task<int> AsyncFunction();
20+
public async Task<int> AsyncFunction(CancellationToken cancellationToken = default);
2121
```
2222

2323
Python async functions can be awaited in C# code.
@@ -46,7 +46,3 @@ This means that even if you use parallel LINQ or other parallel constructs in C#
4646

4747
Python 3.13 and above have a feature called "free-threading mode" which allows the Python interpreter to run in a multi-threaded environment without the Global Interpreter Lock (GIL). This is a significant change to the Python runtime and can have a big impact on the performance of Python code running in a multi-threaded environment.
4848
See [Free-Threading Mode](advanced.md#free-threading-mode) for more information.
49-
50-
## Cancellation Tokens
51-
52-
Coroutine objects have an `AsTask<TYield>(CancellationToken)` API, but the source generator does not yet propagate the cancellation token argument to the generated interfaces, if you want to use cancellation tokens, please raise an issue with your use case.

0 commit comments

Comments
 (0)