Channel
EditA Channel is an object used to communicate between Thread objects. Different threads can send messages on the same Channel to communicate with each other. Messages can be sent and received on a Channel using Channel:push and Channel:pop, and are received in a first-in-first-out fashion. The following types of data can be passed through Channels: nil, boolean, number, string, lightuserdata, table, vector, and any LÖVR object.
Constructors
| lovr.thread.newChannel | Create a new, unnamed Channel. |
| lovr.thread.getChannel | Get a Channel for communicating between threads. |
Methods
| Channel:clear | Clear all messages from the Channel. |
| Channel:getCount | Get the number of messages in the Channel. |
| Channel:hasRead | Get whether a message has been read. |
| Channel:peek | Look at a message from the Channel without popping it. |
| Channel:pop | Pop a message from the Channel. |
| Channel:push | Push a message onto the Channel. |
| Object:release | Immediately release the Lua reference to an object. |
| Object:type | Get the type name of the object. |