yevpator75 wrote on Tuesday, May 28, 2019:
Hello
I have 2 queues and a task that is designed as a state machine.
In some states I need to pend only on one queue among the two I mentioend above and in one specific state - on both of the queues. For this specific case I created a queue set. Thus, we have:
- Two separates quees
- The queue set that consits of 2 the same queues
The problem I’m facing is that whenever I receive a message on on of the queues in some states, this triggers the queue set too and when I move to the task state where I pend on the queue set I immediately wakeup because the queue was set by posting to one of its queues. Then, after my queue set wakes up I need to receive a message from this queue and the queue is empty causing configASSERT to fail.
My question is about a way to overcome the problem I expalined above? THat is to say, if I receive a message on the queue while blocking on it, reset the QueueSet so it wont hurt another queue ?
I do have a couple of ideas :
- Not to use the Queue set, but to create a separate task for the 2nd queue
- When I wakeup on the queue set and then I check which is the activated member, to ignore the message if the activated member is empty
Hope my description is clear enough.
Thanks for any advice !