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 Worker.vi in the Worker's Launcher VI.) Messages are dequeued by the Dequeue Message.vi at the beginning of a Worker's MHL.

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

Priority
Availability

Critical

Internal (framework reserved)

High

Developer (Worker API)

Normal

Developer (Worker API)

Low

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.

Last updated