Coroutine.resume
From ComputerCraft Wiki
Revision as of 18:25, 22 April 2013 by Hawk777 (Talk | contribs) (Remove example that doesn’t show anything interesting on its own, improve description, and use type template)
Function coroutine.resume | |
Starts or resumes an existing coroutine. The second and subsequent parameters are passed as parameters to coro’s body if this is the first resumption of coro, or appear as return values from coroutine.yield otherwise. The coroutine calling this function becomes the parent of coro. | |
Syntax | coroutine.resume(coroutine coro, [var1], [var2], …) |
Returns | boolean true and the values returned from coro’s body (if it returned) or passed to coroutine.yield (if it yielded) on success, or false and a message if coro cannot be resumed (e.g. because it is not suspended) or if its body throws an error |
Part of | ComputerCraft |
API | Coroutine |
Examples
Please see Coroutine (API) for a worked example of using all the coroutine functions.