Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code example is wrong... #10424

Open
Avivsalem opened this issue Sep 23, 2024 · 0 comments
Open

code example is wrong... #10424

Avivsalem opened this issue Sep 23, 2024 · 0 comments
Labels
area-System.Threading Pri3 Indicates issues/PRs that are low priority untriaged New issue has not been triaged by the area owner

Comments

@Avivsalem
Copy link

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

@dotnet-bot

@issues-automation issues-automation bot added the Pri3 Indicates issues/PRs that are low priority label Sep 23, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Threading Pri3 Indicates issues/PRs that are low priority untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

1 participant