dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

Cancellation Token observability in the Wait method

Open brettcaswell opened this issue 4 months ago • 1 comments

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

brettcaswell avatar Aug 28 '25 18:08 brettcaswell