private void CreateSemaphoreCore(int initialCount, int maximumCount, string name, out bool createdNew) { Debug.Assert(name == null); SafeWaitHandle = WaitSubsystem.NewSemaphore(initialCount, maximumCount); createdNew = true; }
private void CreateSemaphoreCore(int initialCount, int maximumCount, string?name, out bool createdNew) { if (name != null) { throw new PlatformNotSupportedException(SR.PlatformNotSupported_NamedSynchronizationPrimitives); } SafeWaitHandle = WaitSubsystem.NewSemaphore(initialCount, maximumCount); createdNew = true; }