What happens if sleep(1000) is called inside a thread?

Last Updated :
Discuss
Comments

What happens if sleep(1000) is called inside a thread?


Thread execution is paused for 1 second

Thread is terminated

Thread goes to NEW state

Thread execution continues immediately

Share your thoughts in the comments