dotnet / dotnet/dotnet-api-docs

Is it possible to change the max value of a named semaphore without reboot?

Open
#6,605 1 comment 0 reactions 0 assignees View on GitHub
area-System.Threading Pri3 product-question untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

I found no methods to directly change the max value of a named semaphore. Even if I disposed and reconstructed one, the new semaphore still inherited the first configuration, i.e., the new max value given to the reconstruction is ignored.
The only way to change the max value I found is to reboot the OS.
Is it by design or a bug? Any workarounds?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.