finishingIf

open fun finishingIf(condition: BooleanSupplier)

Run the task assigned to in run() until this condition is met. Once this condition is met, the task will be forcefully stopped and the scheduler will move on. This is useful for continuous tasks.

Parameters

condition

The condition to stop the task. Note the task will be auto-stopped if it finishes by itself, this condition simply allows for an early finish if this condition is met.