# Does the await() call blocks the execution thread

**URL:** <https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [August 13, 2021, 4:59pm UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717 "2021-08-13T16:59:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arkadi\_Kreichman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/arkadi_kreichman/32/1208_2.png) [@Arkadi\_Kreichman](https://community.temporal.io/u/Arkadi_Kreichman)\
**Post date:** [August 13, 2021, 4:59pm UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717/1 "2021-08-13T16:59:26Z")

</div>

Does the await() blocks the execution thread ? Or it’s suspends the flow and release it ?

We plan to use it as a batch aggregator, a signal will add to the batch and as soon the batch will meet size or time window requirements the messages will be processed by a child flow.

The question, is it better to use await or the timer sleep call, in order not to block the executing thread and cause performance degradation. Please advise ?

Thank you.

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [August 13, 2021, 5:01pm UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717/2 "2021-08-13T17:01:52Z")

</div>

> Does the await() blocks the execution thread ? Or it’s suspends the flow and release it ?

It suspends the workflow execution and later recovers it. So a workflow that is blocked for a long time doesn’t consume resources on the worker.

> We plan to use it as a batch aggregator, a signal will add to the batch and as soon the batch will meet size or time window requirements the messages will be processed by a child flow.

Keep in mind that a single workflow instance cannot grow very large or process a large update rate. What is the batch size and number of signals per second processed by a single workflow execution (instance)?

---

<div class="post-metadata">

**Author:** ![Arkadi\_Kreichman](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/arkadi_kreichman/32/1208_2.png) [@Arkadi\_Kreichman](https://community.temporal.io/u/Arkadi_Kreichman)\
**Post date:** [August 13, 2021, 6:42pm UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717/3 "2021-08-13T18:42:10Z")

</div>

Thank you for a prompt response.

---

<div class="post-metadata">

**Author:** ![Gaurav1234](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/gaurav1234/32/5314_2.png) [@Gaurav1234](https://community.temporal.io/u/Gaurav1234)\
**Post date:** [May 7, 2024, 8:28am UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717/4 "2024-05-07T08:28:51Z")

</div>

@maxim could you please elaborate why it cannot grow very large? and what is the limit

---

<div class="post-metadata">

**Author:** ![maxim](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/maxim/32/8_2.png) [@maxim](https://community.temporal.io/u/maxim)\
**Post date:** [May 7, 2024, 3:55pm UTC](https://community.temporal.io/t/does-the-await-call-blocks-the-execution-thread/2717/5 "2024-05-07T15:55:51Z")

</div>

Temporal relies on the event history to recover workflow state through replay. So, a very long history would lead to long recovery times. The current limits are documented here:

> **[What is a Temporal Workflow? | Temporal Documentation](https://docs.temporal.io/workflows#limits)**
>
> This guide provides a comprehensive overview of Temporal Workflows.
