Module extensions.coroutine

Extensions to the Lua standard coroutine library.

Functions

assertresume (thread[, ...]) Properly asserts a coroutine resume in order to get the correct traceback on error.
isthread () Returns whether or not the function was run inside of a coroutine.


Functions

assertresume (thread[, ...]) line 21
Properly asserts a coroutine resume in order to get the correct traceback on error. Consumes the first return from resume (the success boolean) and returns the rest.

Parameters:

  • thread thread
  • ... any (optional)

Returns:

    ...
isthread () line 33
Returns whether or not the function was run inside of a coroutine. Returns false if it is on the main thread.

Returns:

    boolean