Can I call xQueueAddToSet while xQueueSelectFromSet is running?

I have a use case where there are multiple tasks each of which have one queue where they are pushing results. I want to have a single task running processing elements from all of these queues. My plan was to have the single processing task use a Queue Set to monitor the multiple client queues.

Here is my question: If the Queue Set currently contains 2 queues and the processing task is blocked from calling XQueueSelectFromSet, is it safe for another thread to call XQueueAddToSet to add another queue to watch? And furthermore, assuming that the previous operation is safe, will adding an element to the queue which was just added to the Queue Set unblock the task that called XQueueSelectFromSet prior to the new queue being added into the set?

It should be ok, but it is rarely necessary to use a queue set. Are you able to have all the tasks post to the same queue?

Using a single queue is another solution that I considered and I may end up there eventually. The disadvantage of that solution is that every queue element then has to be sized based on the client with the largest payload.

Thanks for the clarification on queue sets!

Have a look at the “Alternatives to using queue sets” section on this page https://www.freertos.org/Pend-on-multiple-rtos-objects.html