Channel:push
EditPushes a message onto the Channel. The following types of data can be pushed: nil, boolean, number, string, table, lightuserdata, vectors, and userdata (LÖVR objects).
id, read = Channel:push(message, wait)
Arguments
Name | Type | Default | Description |
message | * | The message to push. | |
wait | number | false |
How long to wait for the message to be popped, in seconds. true can be used to wait forever and false can be used to avoid waiting.
|
Returns
Name | Type | Description |
id | number | The ID of the pushed message. |
read | boolean | Whether the message was read by another thread before the wait timeout. |
Notes
Threads can get stuck forever waiting on Channel messages, so be careful.