TimeOutSemaphore

open class TimeOutSemaphore

Semaphore wrapper that automatically times out in 5 seconds so that we don't forget to do it and hang tests or not check for whether the lock was successfully acquired.

Constructors

Link copied to clipboard
constructor(numPermits: Int)

Functions

Link copied to clipboard
open fun acquire()
Link copied to clipboard
open fun drainPermits()
Link copied to clipboard
open fun release()
Link copied to clipboard
open fun setException(t: Throwable)
Set an Exception to indicate an Exception that should be raised occurred that should be communicated to whoever is acquiring this semaphore.