vibe.d beta banner
get vibe.d
0.8.0

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

Constructors

NameDescription
this

Properties

Properties

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

Methods

Methods

NameDescription
lockAcquires a lock.
tryLockTry to acquire a lock.
unlockGives up an existing lock.
Authors

Leonid Kramer, Sönke Ludwig, Manuel Frischknecht

Copyright

© 2012-2015 RejectedSoftware e.K.

License

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