Base class for counting semaphores based on Semaphore implementation from Doug Lea.
For a list of all members of this type, see Semaphore Members .
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Conceptually, a semaphore maintains a set of permits. Each acquire() blocks if necessary until a permit is available, and then takes it.
Each release adds a permit. However, no actual permit objects are used; the Semaphore just keeps a count of the number available and acts accordingly.
A semaphore initialized to 1 can serve as a mutual exclusion lock.Used for implementation of a SimplePool
Assembly: Spring.Core (in Spring.Core.dll)