rtel wrote on Wednesday, March 29, 2017:
The test in the assert is valid. As already pointed out in this thread, it is checking the line below it doesn’t fail, because if it did fail then the queue set would be in an inconsistent state.
When you are using a queue set you MUST ensure the number of spaces in the queue set is greater than or equal to the sum of all the spaces in the queues added to the set. If that is not the case then you can add something to a queue that is a set without the set ever knowing. That is what the assert is guarding against.
When you read from a queue set you MUST then also read from the queue. That is, if you read queue handle X from a queue set you MUST then read the item from queue X - again otherwise the queue set will be in an inconsistent state.