-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.ThreadinguntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
Description
Type of issue
Code doesn't work
Description
[Enter feedback here]
the code example creates the semaphore with inital count of 0
semaphore = new SemaphoreSlim(0, 3);
this actually means that the semaphore cannot be waited on....
instead it should be create with initial count of 3 (which means it can be waited on 3 times)
semaphore = new SemaphoreSlim(3, 3);
please fix this
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.threading.semaphoreslim?view=net-8.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading/SemaphoreSlim.xml
Document Version Independent Id
92f24f67-5b11-f1d1-a8cc-b8bf8fbe7ddc
Article author
Metadata
Metadata
Assignees
Labels
Pri3Indicates issues/PRs that are low priorityIndicates issues/PRs that are low priorityarea-System.ThreadinguntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner