task

Show Deprecated

The task library allows for functions and threads to be scheduled with the Task Scheduler.

The functions available in this library generally support functions and threads. In most cases using a function is sufficient, but for more advanced cases it's recommended you familiarize yourself with the coroutine library.

Summary

Functions

spawn(functionOrThread: function | thread, ...: Variant): thread  

defer(functionOrThread: function | thread, ...: Variant): thread  

delay(duration: number, functionOrThread: function | thread, ...: Variant): thread  

desynchronize(): void  

synchronize(): void  

wait(duration: number): number  

cancel(thread: thread): void  

Functions

spawn

Parameters

functionOrThread: function | thread
...: Variant

Returns

defer

Parameters

functionOrThread: function | thread
...: Variant

Returns

delay

Parameters

duration: number
functionOrThread: function | thread
...: Variant

Returns

desynchronize

void

Returns

void

synchronize

void

Returns

void

wait

Parameters

duration: number
Default Value: 0

Returns

cancel

void

Parameters

thread: thread

Returns

void