Skip to content
Andrew Kvapil edited this page Nov 16, 2015 · 4 revisions

Thread class

The thread class is a wrapper for coroutines, designed for use with the multitasking aspect of Application.

Constructor

Thread( string f, ... )
Thread( function f, ... )

vararg (...) are the arguments to initialise the thread with.

Variables

running

Thread.running - boolean

Whether the thread is running. Equals to false if the thread has finished or has been stopped.

Methods

stop()

Thread:stop()

Stops the thread from running.

restart()

Thread:restart()

Starts the thread again.

resume()

Thread:resume( string event, ... )

Resumes the coroutine of the thread. Used to pass events to threads.

Clone this wiki locally