May 2020
Intermediate to advanced
496 pages
13h 54m
English
Another case where accessing a queue can cause a task to block is attempting to receive from an empty queue:

Similar to a Send waiting on space to become available, a task receiving from a queue also has the potential to be delayed. In the case of an empty queue, the task that is attempting to receive from the queue will be blocked until an item appears in the queue. If no item is available before the timeout expires, the calling code will be notified of the failure. Again, the exact course of action to take varies.
Sometimes, infinite waits are used. You'll often encounter very long wait periods for queues that are receiving ...