coroutine.create

coroutine.create
Function
Syntax
coroutine.create(
  • Function : function
)

Returns thread
API Base globals
Source Lua

Creates a thread from a function.

Examplecreates a thread from a function.
Create a thread from the function "print".
Code
<nowiki>
local co = coroutine.create(print)
    </nowiki>
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.