class · System.Threading
SemaphoreSlim
public class System.Threading.SemaphoreSlim : System.Any
Counts permits: Wait takes one (waiting while there are none), Release gives them back.
- Kind
- class
- Namespace
- System.Threading
- Assembly
- System.Core
- Access
- public, final
- Source file
Threading.ant
Inheritance
- Base classes
-
AnySemaphoreSlim
Constructors
Properties
Methods
method Wait() -> void
#
Waits at most milliseconds: whether it took a permit.
Gives releaseCount permits back: the count before.
method Dispose() -> void
#
Frees what it holds (it must not be used after).
Private and internal members (4)
Inherited members (5)
GetTypemethod from AnyUndescribedmethod from AnyToStringmethod from AnyHashmethod from Anydestroymethod from Any
Source
SemaphoreSlim as Larva HIR, decompiled from its Larva HIR.
// Counts permits: Wait takes one (waiting while there are none), Release gives them back.
public class System.Threading.SemaphoreSlim : System.Any
{
field mutex: System.Threading.Mutex
field changed: System.Threading.Condition
field count: i32
field most: i32
constructor SemaphoreSlim(initialCount: i32)
constructor SemaphoreSlim(initialCount: i32, maxCount: i32)
method Wait() -> void
// Waits at most `milliseconds`: whether it took a permit.
method Wait(milliseconds: i32) -> bool
// Gives `releaseCount` permits back: the count before.
method Release(releaseCount: i32) -> i32
method Release() -> i32
// Frees what it holds (it must not be used after).
method Dispose() -> void
property CurrentCount: i32
}