Interface SynchronizerApi.SleepRunGet
-
- All Superinterfaces:
SynchronizerApi.RunGet
- All Known Implementing Classes:
Synchronizer
- Enclosing interface:
- SynchronizerApi
public static interface SynchronizerApi.SleepRunGet extends SynchronizerApi.RunGet
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SynchronizerApi.RunGetsleepUntil(BooleanSupplier state)Adds sleeping to the action chain.-
Methods inherited from interface com.github.mizool.core.concurrent.SynchronizerApi.RunGet
get, run
-
-
-
-
Method Detail
-
sleepUntil
SynchronizerApi.RunGet sleepUntil(BooleanSupplier state)
Adds sleeping to the action chain.
When performing this action, the chain will sleep until another chain wakes it up, then call the given supplier. If the supplier returnsfalse, this action chain resumes sleeping. Otherwise, the chain continues by performing the main action.- Parameters:
state- the supplier that returnstrueif the action chain should continue,falseotherwise.- Throws:
NullPointerException- ifstateis null
-
-