Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • This is what wekempf suggested in his answer. Commented Feb 6, 2019 at 8:08
  • 2
    Unfortunately, named Semaphore don't seem to work on all OSes. System.PlatformNotSupportedException: The named version of this synchronization primitive is not supported on this platform. Stack Trace: at System.Threading.Semaphore.CreateSemaphoreCore(Int32 initialCount, Int32 maximumCount, String name, Boolean& createdNew) at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name, Boolean& createdNew) at System.Threading.Semaphore..ctor(Int32 initialCount, Int32 maximumCount, String name) Commented Aug 19, 2022 at 20:18