Open
Description
This docs mix tasks with threads. A task is not a thread ! 2 different tasks can run in the same thread. It's the TaskScheduler job to determines which Task runs on which thread. Thus this documentation is very confusing. SemaphoreSlim does not lock access to a thread. It locks access to a resource. Which can be of any kind!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: e1be1dd3-b825-9f35-eafb-8904eca9f9d7
- Version Independent ID: 92f24f67-5b11-f1d1-a8cc-b8bf8fbe7ddc
- Content: SemaphoreSlim Class (System.Threading)
- Content Source: xml/System.Threading/SemaphoreSlim.xml
- Product: dotnet-api
- GitHub Login: @rpetrusha
- Microsoft Alias: ronpet