coroutine.resume

coroutine.resume
Function
Syntax
coroutine.resume(
  • coroutine : any The coroutine to resume
  • ... : any Arguments to pass to the coroutine
)

Returns boolean
API Base globals
Source Lua

Resumes a coroutine.

ExampleResume coroutine.
Resumes a coroutine with "test".
Code
<nowiki>
local co = coroutine.create(function(x)
  print(x)
end)
coroutine.resume(co, "test")
    </nowiki>
Output
test
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.