dotnet / dotnet/dotnet-api-docs
Cancellation Token observability in the Wait method
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### Type of issue
Missing information
### Description
Documentation describes how `CancellationToken` is observed when passed to `Wait`, but that seems to mean it is only observed in that initial call.
So, it remains unclear whether the `CancellationToken`, if timed out while a Wait is occurring, will increment the count or throw an exception in the context of the waiting thread/task.
### Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.threading.semaphoreslim.wait?view=net-9.0
### Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading/SemaphoreSlim.xml
### Document Version Independent Id
007f95cb-7691-1634-521a-1369a69f3a70
### Platform Id
5c8ccdb8-a672-3237-a77a-2984de945cc1
### Article author
@dotnet-bot
Contributor guide
Assessment
This issue has not been assessed yet.