Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Components can use the queue.push function to push messages into the queue for the component.

These messages are received by all the components that have connections from that component (see Linking components). This is the Lua code to call it:

local MessageId = queue.push{data=Data}

This function returns a unique string identifier (the message ID) which can be used to link messages so you can see actions performed on a message in the Logs.

See Custom Logging for more information on this.

You can also use queue.count() to obtain the number of messages in the current components queue. This can be useful for many applications.

One of the ways we use it is with out Build system. If we have several GIT commits queued up then we skip the first few in the queue because builds take a few minutes and it doesn’t make sense to build lots of small commits which are not that important.

  • No labels