C# Класс Renci.SshNet.Common.SemaphoreLight

Light implementation of SemaphoreSlim.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Release() публичный Метод

Exits the SemaphoreLight once.
public Release ( ) : int
Результат int

Release() публичный Метод

Exits the SemaphoreLight a specified number of times.
public Release ( int releaseCount ) : int
releaseCount int The number of times to exit the semaphore.
Результат int

SemaphoreLight() публичный Метод

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.
Результат System

Wait() публичный Метод

Blocks the current thread until it can enter the SemaphoreLight.
public Wait ( ) : void
Результат void