Skip to main content

threadLoop

Description:

  Create a new coroutine from a function that runs repeatedly.

Signature:

threadLoop: function(routine: function(): boolean): Routine.Job

Parameters:

ParameterTypeDescription
routinefunctionA function to execute repeatedly as a coroutine. The function should return false to continue running, or true to stop.

Returns:

Return TypeDescription
Routine.JobA handle to the coroutine that was created.