Managed wrapper for Win32 Semaphore
.Net Framework v. 1.x. does not contain class with functionality object Semaphore. This example shows the simple implementation of this class. User of class can:
- Create new Semaphore
- Open specified Semaphore
- Increase Semaphore counter
- Decrease Semaphore counter
Semaphore class is created as an inheritor on System.Threading.WaitHandle class. As a result there is the wrapper for those Windows API functions: CreateSemaphore, OpenSemaphore, ReleaseSemaphore, WaitForSingleObject.