public interface AsyncCondition
signal().)| Modifier and Type | Method and Description |
|---|---|
xapi.util.api.RemovalHandler |
await(xapi.util.api.SuccessHandler<xapi.util.api.Pair<AsyncLock,AsyncCondition>> onAcquire)
Waits indefinitely for the given condition.
|
xapi.util.api.RemovalHandler |
awaitWithDeadline(xapi.util.api.SuccessHandler<xapi.util.api.Pair<AsyncLock,AsyncCondition>> onAcquire,
float millisToWait)
The same rules as
await(SuccessHandler), but with a millisecond
timeout that will share a notification pool, so a minimum of threads
are needed to simply check deadlines and cancel / notify / continue. |
boolean |
signal()
Signals one waiting success handler, and returns true,
-if the pool of waiting conditions was empty BEFORE calling onAcquire.onSuccess-
|
xapi.util.api.RemovalHandler await(xapi.util.api.SuccessHandler<xapi.util.api.Pair<AsyncLock,AsyncCondition>> onAcquire)
onAcquire - - A SuccessHandler to be notified when we are signalled.awaitWithDeadline(SuccessHandler, float)
If your SuccessHandler is also an ErrorHandler, you will receive
a CancellationException when RemovalHandler.remove() is called.xapi.util.api.RemovalHandler awaitWithDeadline(xapi.util.api.SuccessHandler<xapi.util.api.Pair<AsyncLock,AsyncCondition>> onAcquire, float millisToWait)
await(SuccessHandler), but with a millisecond
timeout that will share a notification pool, so a minimum of threads
are needed to simply check deadlines and cancel / notify / continue.onAcquire - - The success handler to call when we are signalled.millisToWait - - A floating point number of milliseconds to wait.RemovalHandler to cancel the operation.
Does nothing if signal has already been called.boolean signal()
Copyright © December 07, 2012-2014 The Internet Party. All Rights Reserved.