The previous example's main purpose was to illustrate the following points:
- Queues can be used to hold arbitrary data.
- Queues interact with task priorities in interesting ways.
There were several trade-offs made to simplify behavior and make the example easier to understand:
- The task receiving from the queue was a low priority: In practice, you'll need to balance the priority of tasks that are receiving from queues (to keep latency low and prevent queues from filling up) against the priority of other events in the system.
- A long queue was used for commands: Deep queues combined with a low-priority task receiving from them will create latency in a system. Because of the combination of low task priority and ...