You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Matt Fichman edited this page Dec 20, 2012
·
11 revisions
Implements a coroutine, or lightweight cooperative thread. The coroutine semantics implemented by this class is intended to be similar to Lua's implementation. Calling the coroutine after it has been created begins executing the coroutine. After a coroutine is finished, calling it again has no effect. A coroutine can yield at any point using the yield() function, which returns control to caller of the coroutine. Resuming causes the execution of the coroutine to continue from the last call to yield().
This function starts or resumes a coroutine. If the coroutine is new, then the execution begins starting at 'function'. If the coroutine is dead, then this function has no effect. Otherwise, the execution resumes from the last yield.
This function starts or resumes a coroutine. If the coroutine is new, then the execution begins starting at 'function'. If the coroutine is dead, then this function has no effect. Otherwise, the execution resumes from the last yield.