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.
- Tipo
- class
- Espacio de nombres
- System.Threading
- Ensamblado
- System.Core
- Acceso
- public, final
- Archivo fuente
Threading.ant
Herencia
- Clases base
-
AnySemaphoreSlim
Constructores
Propiedades
Métodos
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).
Miembros privados e internos (4)
Miembros heredados (5)
GetTypemétodo de AnyUndescribedmétodo de AnyToStringmétodo de AnyHashmétodo de Anydestroymétodo de Any
Código fuente
SemaphoreSlim en Larva HIR, descompilado a partir de su 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
}