frost.threads

Class Notifier

    └ Immutable
         └ Object

A condition variable which helps multiple Threads coordinate their scheduling. Notifier is not necessary from within safe Frost code; normally you would use MessageQueue to coordinate between threads. Notifier generally only comes into play when Locks are necessary due to unsafe threading.

Source Code:
View Source

Initializer Summary

init(lock:Lock)
Inherited Fields:

Instance Method Summary

wait()
Blocks the current thread until another thread calls the notify() or notifyAll() method on this notifier.
notify()
If any other threads are waiting on this Notifier, chooses one of them (in a system-dependent fashion) and wakes it up.
notifyAll()
If any other threads are waiting on this Notifier, wakes up all of them.

Initializers

init (lock:Lock)
Parameters:
lock - value of type Lock

Instance Methods

method wait ()

Blocks the current thread until another thread calls the notify() or notifyAll() method on this notifier.

method notify ()

If any other threads are waiting on this Notifier, chooses one of them (in a system-dependent fashion) and wakes it up.

method notifyAll ()

If any other threads are waiting on this Notifier, wakes up all of them.