# Feature-request: QueueSets with ability to add the same Queue handle to several Sets

**URL:** <https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024>\
**Category:** Kernel\
**Tags:** feature-request\
**Created:** [May 10, 2024, 1:53pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024 "2024-05-10T13:53:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitaly\_S](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vitaly\_S](https://forums.freertos.org/u/Vitaly_S)\
**Post date:** [May 10, 2024, 1:53pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024/1 "2024-05-10T13:53:34Z")

</div>

It would be useful for future versions of FreeRTOS to support Queue Sets in a way that would allow adding the same object (Queue or Semaphore) to more than one QueueSet. Currently this is impossible. I recently worked on a project where this feature would allow me to reduce number of necessary threads by one, because with this possibility, I would have been able to implement communication stuff for serial interface, receive and send functions, in only one thread, but without it, I ended up with two – separate threads for RX and TX.

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 10, 2024, 4:16pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024/2 "2024-05-10T16:16:37Z")

</div>

Hi - thanks for the suggestion. It would need some considering to see how to implement that. I suggest [opening a feature request in git](https://github.com/FreeRTOS/FreeRTOS-Kernel/issues) so it doesn’t get lost.

---

<div class="post-metadata">

**Author:** ![richard-damon](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/richard-damon/32/38_2.png) [@richard-damon](https://forums.freertos.org/u/richard-damon)\
**Post date:** [May 10, 2024, 4:51pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024/3 "2024-05-10T16:51:33Z")

</div>

The problem is that “Queue Sets” are implemented with a Queue that has a message put on when one of the queues in the set has an operation to do. If I queue is put in multiple sets, then the notification would be put in multiple queues, and then when those notifications are taken from each of the queues, two requests from that queue would happen, for just a single item on the queue.

This could work if it was defined that the QueueSet might give notifications for items on a Queue that ended up not being available.

An alternate method might be to use an EventGroup to notify of data availability, where tasks first check if data is available on the queues, and then block on the group to wait for more data.

---

<div class="post-metadata">

**Author:** ![Vitaly\_S](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@Vitaly\_S](https://forums.freertos.org/u/Vitaly_S)\
**Post date:** [May 10, 2024, 5:36pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024/4 "2024-05-10T17:36:32Z")

</div>

I opened feature request on GitHub for this functionality. As for use of EventGroup, it should work, but then in addition to Queues with TX/RX data, one will need to create and manage additional Event Group object.

---

<div class="post-metadata">

**Author:** ![RAc](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rac/32/1389_2.png) [@RAc](https://forums.freertos.org/u/RAc)\
**Post date:** [May 10, 2024, 6:26pm UTC](https://forums.freertos.org/t/feature-request-queuesets-with-ability-to-add-the-same-queue-handle-to-several-sets/20024/5 "2024-05-10T18:26:33Z")

</div>

This request appears to be similar to the issue I raised in the faeture wish thread:

> [@What could FreeRTOS do next? Share your Ideas](https://forums.freertos.org/t/what-could-freertos-do-next-share-your-ideas/19626/9):
>
> I have frequently lobbied for an asynchronous “I/O model” that supports something similar to Windows’ I/O completion ports (there is also something similar on linux called urings). See for example here: [Device Driver Model - suggestions - #6 by RAc](https://forums.freertos.org/t/device-driver-model-suggestions/14202/6) Very briefly, it is an architecture that allows several outstanding blocking waits to be associated with a pool of worker threads. Each worker thread can process any of the computations once unblocked. It is a fantastic tool to build very efficient …

Unfortunately, that seems to never have made it onto the “official” list. Oh well.
