Module flower.Executors

This is a utility class for asynchronous (coroutine-style) execution.

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

callLoop (func, ...) Run the specified function in a loop in a coroutine, forever.
callOnce (func, ...) Run the specified function once, in a coroutine, immediately (upon next coroutine.yield())
callLaterFrame (frame, func, ...) Run the specified function once, in a coroutine, after a specified delay in frames.
callLaterTime (time, func, ...) Run the specified function once, in a coroutine, after a specified delay in seconds.
callLoopTime (time, func, ...) Run the specified function in loop by a span time over and over again


Functions

callLoop (func, ...)
Run the specified function in a loop in a coroutine, forever. If there is a return value of a function of argument, the loop is terminated.

Parameters:

  • func Target function.
  • ... Arguments to be passed to the function.

Returns:

    MOAICoroutine object
callOnce (func, ...)
Run the specified function once, in a coroutine, immediately (upon next coroutine.yield())

Parameters:

  • func Target function.
  • ... Arguments.

Returns:

    MOAICoroutine object
callLaterFrame (frame, func, ...)
Run the specified function once, in a coroutine, after a specified delay in frames.

Parameters:

  • frame Delay frame count.
  • func Target function.
  • ... Arguments.

Returns:

    MOAICoroutine object
callLaterTime (time, func, ...)
Run the specified function once, in a coroutine, after a specified delay in seconds.

Parameters:

  • time Delay seconds.
  • func Target function.
  • ... Arguments.

Returns:

    MOAITimer object
callLoopTime (time, func, ...)
Run the specified function in loop by a span time over and over again

Parameters:

  • time loop seconds.
  • func Target function.
  • ... Arguments.

Returns:

    MOAITimer object
generated by LDoc 1.3