C# Class Renci.SshNet.Common.SemaphoreLight

Light implementation of SemaphoreSlim.
Afficher le fichier Open project: sshnet/SSH.NET Class Usage Examples

Méthodes publiques

Méthode Description
Release ( ) : int

Exits the SemaphoreLight once.

Release ( int releaseCount ) : int

Exits the SemaphoreLight a specified number of times.

SemaphoreLight ( int initialCount ) : System

Initializes a new instance of the SemaphoreLight class, specifying the initial number of requests that can be granted concurrently.

Wait ( ) : void

Blocks the current thread until it can enter the SemaphoreLight.

Method Details

Release() public méthode

Exits the SemaphoreLight once.
public Release ( ) : int
Résultat int

Release() public méthode

Exits the SemaphoreLight a specified number of times.
public Release ( int releaseCount ) : int
releaseCount int The number of times to exit the semaphore.
Résultat int

SemaphoreLight() public méthode

Initializes a new instance of the SemaphoreLight class, specifying the initial number of requests that can be granted concurrently.
is a negative number.
public SemaphoreLight ( int initialCount ) : System
initialCount int The initial number of requests for the semaphore that can be granted concurrently.
Résultat System

Wait() public méthode

Blocks the current thread until it can enter the SemaphoreLight.
public Wait ( ) : void
Résultat void