flix

0.67.2

Concurrent.Condition

enum ConditionSource
case Condition(java.util.concurrent.locks.Condition)

A wrapper around a Java Condition.

Definitions

def await(condition: Condition): Unit \ IO Source

Causes the current thread to wait until it is signalled or interrupted.

def awaitTimeout(condition: Condition, timeout: Int64): Int64 \ IO Source

Causes the current thread to wait until it is signalled or interrupted, or the specified waiting time(nanos) elapses. The method returns an estimate of the number of nanoseconds remaining to wait given the supplied nanosTimeout value upon return, or a value less than or equal to zero if it timed out.

def signal(condition: Condition): Result[java.lang.IllegalMonitorStateException, Unit] \ IO Source

Wakes up one waiting thread.

def signalAll(condition: Condition): Result[java.lang.IllegalMonitorStateException, Unit] \ IO Source

Wakes up all waiting threads.