Skip to main content

once

Description:

  Create a coroutine job that runs once.

Signature:

once: function(routine: function()): Routine.Job

Parameters:

ParameterTypeDescription
routinefunctionA routine function to execute once when the coroutine is resumed.Yield true or just return inside the routine function to stop the job execution half way.

Returns:

Return TypeDescription
Routine.JobA coroutine that runs the given routine function once.