# Sleepless Concurrency: delay() vs. Thread.sleep()

DevFeed: [Sleepless Concurrency: delay() vs. Thread.sleep()](<https://devfeed.tech/articles/sleepless-concurrency-delay-vs-thread-sleep-25750.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/sleepless-concurrency-delay-vs-threadsleep/>)

Author: Shreyas Patil

Published: 2023-07-31T04:39:30Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [threading](<https://devfeed.tech/tags/threading.md>)

## AI overview

This tutorial explains how Kotlin coroutines implement delay() on the JVM and contrasts its non-blocking behavior with Java's blocking Thread.sleep(). A single-thread example shows that delay() allows concurrent coroutines to progress, while Thread.sleep() makes the second coroutine wait and roughly doubles total execution time.

## Source excerpt

Explore the difference between delay() and Thread.sleep() in Kotlin. Understand how non-blocking concurrency works from a platform perspective.