once
Description:
Create a coroutine job that runs once.
Signature:
once: function(routine: function()): Routine.Job
Parameters:
Parameter | Type | Description |
---|---|---|
routine | function | A 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 Type | Description |
---|---|
Routine.Job | A coroutine that runs the given routine function once. |