Priority Queue

Workers Fundamental Concepts

Messages are sent between Worker MHL cases via priority message queues. Unlike standard LabVIEW FIFO queues and events, the Workers message queue allows you to assign priorities to your messages, giving you more control over which messages should be processed first ahead of less important messages, helping to make your applications more deterministic and responsive.

Workers uses the same priority queue used by the LabVIEW Actor Framework, so the performance and features of the queue are the same as that of the Actor Framework.

Each Worker is assigned a message queue by its Caller when the Worker is created. (Head Workers have their message queue assigned by the Setup Head in the Worker's Launcher VI.) Messages are dequeued by the Dequeue at the beginning of a Worker's MHL.

Messages in the Workers message queue can be set to one of four possible priorities.



Internal (framework)


Developer (Worker API)


Developer (Worker API)


Developer (Worker API)

The initialization and shutdown sequences of a Workers application are sent critical priority messages internally within the framework, so that a Workers initialization and shutdown sequence will be propagated through a Worker's call-chain immediately.

Through use of the Worker APIs VIs, developers can set their messages to either High, Normal (default) or Low, depending on the message requirements.

Good to know:

The priority queue dequeues messages in the same order they are enqueued, for any given priority, avoiding the reverse ordering of dequeued messages that can potentially occur when enqueuing elements (high priority) at the opposite end of a standard FIFO queue.

Last updated