coroutine.create

From ComputerCraft
Jump to navigation Jump to search

coroutine.create
Function
Syntax
coroutine.create()
Returns thread
API Base globals
Source Lua

Creates a thread from a function.

ExampleExamplecreates a thread from a function.
Create a thread from the function "print".
Code
local co = coroutine.create(print)