# Question about Workflow.await and Workflow.sleep

**URL:** <https://community.temporal.io/t/question-about-workflow-await-and-workflow-sleep/6286>\
**Category:** Community Support\
**Tags:** java-sdk\
**Created:** [October 22, 2022, 1:48pm UTC](https://community.temporal.io/t/question-about-workflow-await-and-workflow-sleep/6286 "2022-10-22T13:48:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravi.ov](https://avatars.discourse-cdn.com/v4/letter/r/5daacb/32.png) [@ravi.ov](https://community.temporal.io/u/ravi.ov)\
**Post date:** [October 22, 2022, 1:48pm UTC](https://community.temporal.io/t/question-about-workflow-await-and-workflow-sleep/6286/1 "2022-10-22T13:48:00Z")

</div>

Hi Team,

Need some clarity on the wait and sleep. When a call to

Workflow.sleep(1000);  
or  
Workflow.await(() → myCondition);

Does it releases the current thread?

in other thread, what I read was

It suspends the workflow execution and later recovers it.

What it means? Does it releases the current thread? and later workflow will be invoked/scheduled again when it receives the signal?

Can you please help on how internally await and sleep work?

---

<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:** [October 22, 2022, 5:28pm UTC](https://community.temporal.io/t/question-about-workflow-await-and-workflow-sleep/6286/2 "2022-10-22T17:28:41Z")

</div>

The short answer is that a workflow that is blocked for a long time doesn’t consume any resources besides space in the database.

The long answer is that workflows are cached by worker processes. While they are cached, they do use a thread when blocked. But they are kicked out of the cache and release the thread as soon as another workflow has a need.

So don’t fear having a very large number of blocked workflows.
