# thread priority and queue

**URL:** <https://forums.freertos.org/t/thread-priority-and-queue/34>\
**Category:** Kernel\
**Created:** [September 25, 2007, 2:35pm UTC](https://forums.freertos.org/t/thread-priority-and-queue/34 "2007-09-25T14:35:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [September 25, 2007, 2:35pm UTC](https://forums.freertos.org/t/thread-priority-and-queue/34/1 "2007-09-25T14:35:09Z")

</div>

**anonymous** wrote on [Tuesday, September 25, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/03287209/#5676):

I can’t seem to find this in the documentation or FAQ.

What is the criteria for choosing the thread to release from send/receive on a queue?Highest priority or longest waiting (or other, I suppose).

---

<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:** [September 25, 2007, 2:47pm UTC](https://forums.freertos.org/t/thread-priority-and-queue/34/2 "2007-09-25T14:47:04Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Tuesday, September 25, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/03287209/#5676/3c00):

It is always the highest priority task that is unblocked.&nbsp; Where there are two or more tasks of equal priority then the one that has been waiting the longest is unblocked.

Regards.
