LocalTaskSemaphore

Thread-local semaphore implementation for tasks.

When the semaphore runs out of concurrent locks, it will suspend. This class is used in vibe.core.connectionpool to limit the number of concurrent connections.

Constructors

this
this(uint max_locks)
Undocumented in source.

Members

Functions

lock
void lock(ubyte priority)

Acquires a lock.

tryLock
bool tryLock()

Try to acquire a lock.

unlock
void unlock()

Gives up an existing lock.

Properties

available
uint available [@property getter]

Number of concurrent locks still available

maxLocks
uint maxLocks [@property setter]
uint maxLocks [@property getter]

Maximum number of concurrent locks

Static functions

asc
bool asc(ThreadWaiter a, ThreadWaiter b)

private

Meta