# The exact operation of xQueueReceive

**URL:** <https://forums.freertos.org/t/the-exact-operation-of-xqueuereceive/1575>\
**Category:** Kernel\
**Created:** [September 6, 2007, 4:41am UTC](https://forums.freertos.org/t/the-exact-operation-of-xqueuereceive/1575 "2007-09-06T04:41:10Z")\
**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 6, 2007, 4:41am UTC](https://forums.freertos.org/t/the-exact-operation-of-xqueuereceive/1575/1 "2007-09-06T04:41:10Z")

</div>

**[maczor](https://sourceforge.net/u/maczor/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/4598e59c/#257e):

Hi

I was just wondering if someone could explain the exact operation of xQueueReceive?

What I am seeing is that if I try to do a Queue receive and there is no data there and I specify a block time of say 10 seconds, that the task does not return and continue to run until the 10 second window expires.&nbsp; This is regardless of whether something is put into the queue after the first check.&nbsp; Is this the expected beahviour?

Thanks

---

<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 6, 2007, 7:22am UTC](https://forums.freertos.org/t/the-exact-operation-of-xqueuereceive/1575/2 "2007-09-06T07:22:16Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, September 06, 2007](https://sourceforge.net/p/freertos/discussion/382005/thread/4598e59c/#257e/5cb7):

No - this is definitely not the expected behaviour.&nbsp; When data is posted to the queue the task will be unblocked.&nbsp; When the task actually runs will depend on its priority relative to the other tasks in the system.&nbsp; Take a look at FreeRTOS/Demo/blocktim.c for an example of this.

Regards.
