<PackageReference Include="System.Threading.AccessControl" Version="11.0.0-preview.5.26302.115" />

System.Threading.SemaphoreAcl

public static class SemaphoreAcl
Provides a Windows-specific extension method for creating Semaphore objects with specific access control list (ACL) security.
public static Semaphore Create(int initialCount, int maximumCount, string name, out bool createdNew, SemaphoreSecurity semaphoreSecurity)

Gets or creates an Semaphore instance, allowing a SemaphoreSecurity instance to be optionally specified to set it during the event creation.

public static Semaphore OpenExisting(string name, SemaphoreRights rights)

Opens a specified named semaphore, if it already exists, and applies the desired access rights.

public static bool TryOpenExisting(string name, SemaphoreRights rights, out Semaphore result)

Tries to open a specified named semaphore, if it already exists, applies the desired access rights, and returns a value that indicates whether the operation succeeded.