startLoop

open fun startLoop(task: Runnable, name: String, loopSleepDuration: Measure<Time>)

Start a new thread with the given infinite loop task. This thread will auto end when the task is interrupted.

Parameters

task

the infinite loop task to run on the new thread

name

the name of the thread to access it later and to log as

loopSleepDuration

the duration to sleep this thread after every loop to save resources


open fun startLoop(task: Runnable, name: String)

Start a new thread with the given infinite loop task. This thread will auto end when the task is interrupted.

Parameters

task

the infinite loop task to run on the new thread

name

the name of the thread to access it later and to log as


open fun startLoop(task: Runnable, loopSleepDuration: Measure<Time>)

Start a new thread with the given infinite loop task. This thread will auto end when the task is interrupted, with a name defined by the class of the Runnable.

Parameters

task

the infinite loop task to run on the new thread

loopSleepDuration

the duration to sleep this thread after every loop to save resources


open fun startLoop(task: Runnable)

Start a new thread with the given infinite loop task. This thread will auto end when the task is interrupted, with a name defined by the class of the Runnable.

Parameters

task

the infinite loop task to run on the new thread