Functions
task
task(name) -> int<collection.TASK>
This creates an item in the task collection. This is a generic collection for any concurrency needs.
- name
string
int<collection.TASK>
reference
reference(type, id) -> id
This creates a new task queue that references the same data, this does not ensure thread safety. The reference may also get out of sync if the original item is overridden.
- type
int<collection.Type
- id
int<collection.Type.*
- An ID from the same collection as the above type.
int<collection.Type.*
- ID for a new collection item from the above id.
schedule
schedule(type, id, func)
Schedules a lua func to be called from the queue.
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type. - func
function()
wait
wait(type, id)
@blocking
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type.
wait_all
wait_all(type)
@blocking
- type
int<collection.Type>
wait_extensive
wait_extensive()
@blocking
This waits for all items across all collections to sync. Realistically, shouldn't be used.
collect
collect(type, id)
Items are collected automatically at the end of execution, but this can be used to collect early in workflows that create a large amount of items. This is important for collections that open files, as they are only closed when collected.
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type.
exists
exists(type, id) -> bool
Note that this is non-blocking, and can return true for items that get collected soon after.
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type.
bool
- If the item exists, and has not been collected.
log
log(type, id, msg)
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type. - msg
string
warn
warn(type, id, msg)
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type. - msg
string
panic
panic(type, id, msg)
@blocking
- type
int<collection.Type>
- id
int<collection.Type.*>
- An ID from the same collection as the above type. - msg
string
Constants
Type
TASK
IMAGE
CONTEXT
QR
Crate
CRATE_WINDOW
CRATE_REF
CRATE_GAMEMAKER
CRATE_TEA
CRATE_LIPGLOSS
CRATE_CACHEDIMAGE
CRATE_SHADER