vibe.d beta banner
get vibe.d
0.8.3

Asynchronous I/O that doesn’t get in your way, written in D

Class LocalTaskSemaphore

Thread-local semaphore implementation for tasks.

class LocalTaskSemaphore ;

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

NameDescription
this

Properties

NameTypeDescription
available[get] uintNumber of concurrent locks still available
maxLocks[get, set] uintMaximum number of concurrent locks

Methods

NameDescription
lock Acquires a lock.
tryLock Try to acquire a lock.
unlock Gives up an existing lock.
Authors

Leonid Kramer, Sönke Ludwig, Manuel Frischknecht

Copyright

© 2012-2016 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.