Skip to content

Cancellation Token observability in the Wait method #11740

@brettcaswell

Description

@brettcaswell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions