coroutine.resume

From ComputerCraft
Jump to: navigation, search

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.

ExampleExampleResume coroutine.
Resumes a coroutine with "test".
Code
local co = coroutine.create(function(x)
  print(x)
end)
coroutine.resume(co, "test")
Output
test