# runBlocking

A Kotlin coroutines function that runs a block in a new coroutine while blocking the current thread until completion.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## runBlocking in practice: Where it should be used and where not

DevFeed: [runBlocking in practice: Where it should be used and where not](<https://devfeed.tech/articles/runblocking-in-practice-where-it-should-be-used-and-where-not-39373.md>)

Original publisher: [Read original article](<https://kt.academy/article/run_blocking>)

Published: 2025-09-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [runBlocking](<https://devfeed.tech/topics/runblocking.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [retrofit](<https://devfeed.tech/tags/retrofit.md>), [runblocking](<https://devfeed.tech/tags/runblocking.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A practical guide to runBlocking in Kotlin Coroutines. It explains how runBlocking converts suspending calls into blocking calls, blocks the calling thread until completion, and creates a new coroutine hierarchy. The article discusses appropriate uses, code smells, and alternatives, including an Android Retrofit interceptor example.

### Source excerpt

A comprehensive guide to using runBlocking in Kotlin Coroutines, including best practices and common pitfalls.

## Kotlin Coroutines use cases for Presentation/API/UI Layer

DevFeed: [Kotlin Coroutines use cases for Presentation/API/UI Layer](<https://devfeed.tech/articles/kotlin-coroutines-use-cases-for-presentation-api-ui-layer-39246.md>)

Original publisher: [Read original article](<https://kt.academy/article/cc-use-cases-presentation-layer>)

Published: 2022-11-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [runBlocking](<https://devfeed.tech/topics/runblocking.md>), [ui](<https://devfeed.tech/topics/ui.md>), [Ktor](<https://devfeed.tech/topics/ktor.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>)

Tags: [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [runblocking](<https://devfeed.tech/tags/runblocking.md>), [scope](<https://devfeed.tech/tags/scope.md>), [ui](<https://devfeed.tech/tags/ui.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how Kotlin Coroutines are used in the presentation, API, and UI layers. It covers framework-provided coroutine launches, custom coroutine scopes, scope cancellation, and appropriate uses of runBlocking, including application startup and tests.

### Source excerpt

How do we use Kotlin Coroutines in the Presentation/API/UI Layer Layer, how do we create scope and start coroutines.