# Coroutines

Coroutines are suspendable computations used to write concurrent, asynchronous code that can suspend without blocking a thread.

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

## Part 2: Hardening Turbine Tests - Kevin Schildhorn

DevFeed: [Part 2: Hardening Turbine Tests - Kevin Schildhorn](<https://devfeed.tech/articles/part-2-hardening-turbine-tests-kevin-schildhorn-109898.md>)

Original publisher: [Read original article](<https://touchlab.co/flake-free-flow-tests-pt2-turbine>)

Published: 2026-10-30T18:00:00Z

Content type: tutorial

Language: en

Sources: [Touchlab](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [coroutine-testing](<https://devfeed.tech/topics/coroutine-testing.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-skills](<https://devfeed.tech/tags/ai-skills.md>), [android](<https://devfeed.tech/tags/android.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutine-testing](<https://devfeed.tech/tags/coroutine-testing.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [debounce](<https://devfeed.tech/tags/debounce.md>), [emissions](<https://devfeed.tech/tags/emissions.md>), [event-streams](<https://devfeed.tech/tags/event-streams.md>), [flow](<https://devfeed.tech/tags/flow.md>), [has](<https://devfeed.tech/tags/has.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [testing](<https://devfeed.tech/tags/testing.md>), [turbine](<https://devfeed.tech/tags/turbine.md>)

### AI overview

To reduce flaky Turbine tests, match assertions and scheduler control to the kind of flow and the behavior under test. For StateFlow and other state holders, prefer checking the current value because rapid updates, equality, or upstream operators can hide intermediate emissions; assert a sequence only when it is part of the contract, and make its timing deterministic. Start collectors before triggering hot-flow events, use runCurrent() to process work queued at the current virtual time, advanceUntilIdle() for end states, and advanceTimeBy() plus runCurrent() for precise time boundaries. Add sync points before expectNoEvents() or expectMostRecentItem(), which otherwise can inspect a buffer before asynchronous work arrives. The excerpt also cautions that shareIn with replay = 0 and stateIn on StandardTestDispatcher may miss hot-source emissions before collection starts; starting collection first or using an Unconfined dispatcher can address that gap. End tests by consuming completion or cancelling and ignoring irrelevant remaining events, and configure Turbine's wall-clock timeout for real-dispatcher work.

### Source excerpt

Testing Flows in your app can be confusing, it's important to know how to avoid flakiness in your Turbine testing.

## Python's asyncio: A Hands-On Walkthrough

DevFeed: [Python's asyncio: A Hands-On Walkthrough](<https://devfeed.tech/articles/python-s-asyncio-a-hands-on-walkthrough-99119.md>)

Original publisher: [Read original article](<https://realpython.com/async-io-python/>)

Author: Leodanis Pozo Ramos

Published: 2026-10-24T14:00:00Z

Content type: tutorial

Language: en

Sources: [Real Python](<https://devfeed.tech/sources/real-python.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [async](<https://devfeed.tech/topics/async.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [scheduling](<https://devfeed.tech/topics/scheduling.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [async-programming](<https://devfeed.tech/tags/async-programming.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [asyncio](<https://devfeed.tech/tags/asyncio.md>), [await](<https://devfeed.tech/tags/await.md>), [chaining](<https://devfeed.tech/tags/chaining.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [examples](<https://devfeed.tech/tags/examples.md>), [python](<https://devfeed.tech/tags/python.md>), [tasks](<https://devfeed.tech/tags/tasks.md>)

### AI overview

Python's `asyncio` runs coroutines concurrently on a single-threaded event loop, letting other tasks proceed while one awaits non-blocking I/O. The tutorial shows defining coroutines with `async def`, yielding with `await`, and starting work with `asyncio.run()`, `gather()`, and `create_task()`. Examples cover chaining dependent coroutines, producer-consumer queues, async iteration and context managers, and handling grouped exceptions. It distinguishes `gather()` (waits for all results in input order) from `as_completed()` (yields results as tasks finish). Async I/O can reduce waiting time for many I/O-bound tasks, but blocking calls inside async functions stall the event loop, and CPU-bound work is better suited to multiprocessing. Async support also depends on libraries providing awaitable operations.

### Source excerpt

Explore how Python asyncio works and when to use it. Follow hands-on examples to build efficient programs with coroutines and awaitable tasks.

## Finally The Official Way of Secure DataStore is Here!

DevFeed: [Finally The Official Way of Secure DataStore is Here!](<https://devfeed.tech/articles/finally-the-official-way-of-secure-datastore-is-here-91132.md>)

Original publisher: [Read original article](<https://proandroiddev.com/finally-the-official-way-of-secure-datastore-is-here-ae878f5eb457?source=rss----c72404660798---4>)

Author: Burak Karaduman

Published: 2026-10-20T16:18:09Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Android Security](<https://devfeed.tech/topics/android-security.md>), [Secure token management](<https://devfeed.tech/topics/secure-token-management.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Exception](<https://devfeed.tech/topics/exception.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [backup](<https://devfeed.tech/tags/backup.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [data](<https://devfeed.tech/tags/data.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [flow](<https://devfeed.tech/tags/flow.md>), [jetpack-datastore](<https://devfeed.tech/tags/jetpack-datastore.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [mobile-app-security](<https://devfeed.tech/tags/mobile-app-security.md>)

### AI overview

The excerpt shows how `androidx.datastore:datastore-tink` can encrypt a typed DataStore through an `AeadSerializer` backed by Tink and an Android Keystore master key, replacing custom AES/GCM storage code. It explains that encryption protects copied files but not data read by the app itself. Decryption or deserialization failures become DataStore corruption; a handler can reset a session, while irreplaceable data needs another recovery plan. Because Android backups can restore the encrypted file and keyset without the device-bound master key, the excerpt advises excluding both from cloud and device-transfer backups. It also outlines migration from legacy encrypted preferences and notes that the library is alpha, key rotation is manual, and migration was unit-tested but not tested on an install retaining real legacy data.

### Source excerpt

Securing data has always been a concern since the early days of app development. Platforms do their best to protect user data, but there are always edge cases. Attackers may still reach sensitive data, even in encrypted form, and if they get the key, the protection is meaningless. So yes, encryption helps, but it is not magic. On Android we started with SharedPreferences. It was simple, widely used, and even had built in encryption through EncryptedSharedPreferences. Then Kotlin Flow and Coroutines arrived, apps reached a global audience, and codebases grew. We now needed async operations, thread safety, type safety, custom objects, proper error handling and reactive streams. SharedPreferences was not designed for that, and DataStore was introduced to solve it. But Google deprecated the Jetpack Security (security-crypto) library, and DataStore had no built in encryption, so most of us wrote our own. Now there is androidx.datastore:datastore-tink, added in DataStore 1.3.0-alpha07. In this post we build a small encrypted session store: a login screen that saves an email and a token, and a home screen that reads them. We also show what happens when decryption fails. The full sample project (with Hilt) is on GitHub: burkido/official-datastore-encryption-sample What encryption protects, and what it does not Encrypting a file protects it when someone gets the file but not your app, for example from a rooted phone, a raw copy of the device storage or a copied backup. It does not protect against code inside your own app, because that code can simply read the decrypted value from DataStore. Encryption is one layer of security. It is not the whole solution.How we did it before Our old setup was similar to the one in this article. A security class created an AES/GCM key in the Android Keystore and managed the IV manually: fun encryptData(keyAlias: String, text: String): Pair<ByteArray, ByteArray> { val secretKey = generateSecretKey(keyAlias) cipher.init(Cipher.ENCRYPT_MODE, se

## The Ghost Work Left Behind by Cancelled Coroutines

DevFeed: [The Ghost Work Left Behind by Cancelled Coroutines](<https://devfeed.tech/articles/the-ghost-work-left-behind-by-cancelled-coroutines-89749.md>)

Original publisher: [Read original article](<https://proandroiddev.com/the-ghost-work-left-behind-by-cancelled-coroutines-a892bd467a6b?source=rss----c72404660798---4>)

Author: Rohan Maity | RotBolt

Published: 2026-10-18T19:56:04Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [cancellation](<https://devfeed.tech/topics/cancellation.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Exception handling](<https://devfeed.tech/topics/exception-handling.md>), [Structured concurrency](<https://devfeed.tech/topics/structured-concurrency.md>), [suspend function](<https://devfeed.tech/topics/suspend-function.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bluetooth](<https://devfeed.tech/tags/bluetooth.md>), [bridges](<https://devfeed.tech/tags/bridges.md>), [cancellations](<https://devfeed.tech/tags/cancellations.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [coroutinescope](<https://devfeed.tech/tags/coroutinescope.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>)

### AI overview

Kotlin coroutine cancellation is cooperative, so failures occur when code catches CancellationException as an ordinary error, callback bridges fail to cancel underlying requests, blocking calls ignore cancellation, or work runs in scopes without a clear owner. The excerpt links these gaps to misleading error logs and empty results, hanging or stale workflows, wasted IO capacity, Bluetooth work surviving disconnects, and saves lost during logout. It recommends rethrowing cancellation, using cancellable bridges that cancel their requests, preferring suspend APIs (or runInterruptible for interruptible JVM calls), assigning scopes to lifecycle owners, and sequencing critical saves and logout in one coroutine. It also distinguishes timeout-as-error from expected timeout, and notes that a Mutex serializes sends without guaranteeing callback arrival order. The review questions suggest where runtime tracing may help; static review cannot prove that a pattern caused an incident.

### Source excerpt

Lessons from a production Android codebase Cancellation in Kotlin Coroutines looks simple: cancel the Job, and the coroutine stops. In production, it is rarely that clean. Cancellation is cooperative. Every suspend function, exception handler, callback bridge and child scope must carry the signal. Break one boundary, and work may continue after its owner is gone. We saw the result in production: false error logs, empty results, stale Bluetooth work and a final save lost during logout. Nothing crashed. The app simply continued with the wrong state. Cancellation is cooperative Kotlin uses CancellationException to stop a coroutine. Functions such as delay and await check the Job and throw when it is cancelled. val job = scope.launch { delay(5_000) updateState() } job.cancel() Here, delay observes cancellation, so updateState is not called. Regular Kotlin code does not check automatically. It keeps running until the next cancellation point. When cancellation becomes a failure return try { repository.fetchNotifications() } catch (error: Exception) { logger.error("Failed to load notifications", error) emptyList() } If the user leaves the screen, viewModelScope is cancelled and fetchNotifications throws CancellationException. The broad catch records a normal lifecycle event as a failure. It also returns emptyList, so the caller cannot distinguish cancellation from a successful query with no data. runCatching has the same problem because it also catches CancellationException. Rethrow cancellation before handling other failures. catch (error: CancellationException) { throw error } catch (error: Exception) { logger.error("Failed to load notifications", error) emptyList() } In production, normal navigation becomes error telemetry. Empty values can appear as missing documents, notifications or time cards. Support sees missing data while the app reports a completed request. Callback bridges can outlive the caller suspend fun loadMessages() = suspendCoroutine { continuation -> ch

## Part 1: Kotlin Flows -- The Air Compressor of Android (Fundamentals & Cold Streams)

DevFeed: [Part 1: Kotlin Flows -- The Air Compressor of Android (Fundamentals & Cold Streams)](<https://devfeed.tech/articles/part-1-kotlin-flows-the-air-compressor-of-android-fundamentals-cold-streams-88051.md>)

Original publisher: [Read original article](<https://proandroiddev.com/part-1-kotlin-flows-the-air-compressor-of-android-fundamentals-cold-streams-7ae94471c1d7?source=rss----c72404660798---4>)

Author: Sandeep Kella

Published: 2026-10-15T16:34:19Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [suspend function](<https://devfeed.tech/topics/suspend-function.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [backpressure](<https://devfeed.tech/tags/backpressure.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [database](<https://devfeed.tech/tags/database.md>), [delay](<https://devfeed.tech/tags/delay.md>), [flow](<https://devfeed.tech/tags/flow.md>), [generate](<https://devfeed.tech/tags/generate.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [network](<https://devfeed.tech/tags/network.md>), [stream](<https://devfeed.tech/tags/stream.md>), [streams](<https://devfeed.tech/tags/streams.md>), [timer](<https://devfeed.tech/tags/timer.md>), [tool](<https://devfeed.tech/tags/tool.md>)

### AI overview

This tutorial introduces Kotlin Flow through an air-compressor analogy, explaining cold streams, collection, operators, cancellation, and backpressure. It also compares Flow with lists, LiveData, and RxJava, and discusses coroutine context and flowOn.

### Source excerpt

Hey! So you want to learn Kotlin Flows? Grab a seat. I know the official documentation can sometimes feel like reading a microwave manual, but I promise you, once you get the mental model right, Flows are going to be your best friend. Forget about the code for a second. Let's talk about air. The Breakdown: The Air Compressor Analogy Imagine you are painting a car using an Air Compressor and a Spray Gun. The Producer (The Compressor): This is where the air is generated. In Kotlin, this is your database, your network call, or a timer. The Flow (The Hose): This is the pipe connecting the compressor to your tool. The Operators (Valves & Filters): Maybe you have a moisture filter on the hose, or a pressure regulator. It modifies the air before it reaches you. The Consumer / Collector (The Spray Gun): This is your Android UI. Here is the most important concept to understand about a standard Kotlin Flow: It is a COLD stream. What does "Cold" mean? Imagine your air compressor is completely turned off and silent. It will not generate a single ounce of air until you pull the trigger on the spray gun. The moment you pull the trigger (in Kotlin, we call this .collect()), the compressor kicks on, air pushes through the filters, and paint comes out. When you let go of the trigger (cancel the coroutine), the whole system shuts down instantly. Diagrammatic Mental Model: Plaintext [Air Compressor] ---> (Pressure Valve) ---> (Moisture Filter) ---> [Spray Gun] (Producer) (Operator: map) (Operator: filter) (Collector) Status: DEAD SILENT until someone pulls the trigger on the Spray Gun. Let's look at how this looks in code: Kotlin // 1. The Compressor (Producer) val airFlow = flow { println("Compressor turned on!") emit("Air Burst 1") delay(1000) // Takes a second to build pressure emit("Air Burst 2") } // 2. The Trigger (Collector) // If we don't write this code below, the "Compressor turned on!" is NEVER printed. coroutineScope.launch { airFlow.collect { air -> println("Spray gun rec

## UI freeze reports are now available in JetBrains Marketplace

DevFeed: [UI freeze reports are now available in JetBrains Marketplace](<https://devfeed.tech/articles/ui-freeze-reports-are-now-available-in-jetbrains-marketplace-84281.md>)

Original publisher: [Read original article](<https://blog.jetbrains.com/platform/2026/10/ui-freeze-reports-in-marketplace/>)

Author: Jakub Chrzanowski

Published: 2026-10-09T14:27:09Z

Content type: tutorial

Language: en

Sources: [JetBrains](<https://devfeed.tech/sources/the-jetbrains-blog.md>)

Topics: [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [releases](<https://devfeed.tech/topics/releases.md>)

Tags: [coroutines](<https://devfeed.tech/tags/coroutines.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [intellij-platform](<https://devfeed.tech/tags/intellij-platform.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [jetbrains-marketplace](<https://devfeed.tech/tags/jetbrains-marketplace.md>), [marketplace-marketplace](<https://devfeed.tech/tags/marketplace-marketplace.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [plugin-development](<https://devfeed.tech/tags/plugin-development.md>), [plugins](<https://devfeed.tech/tags/plugins.md>), [ui-freezes](<https://devfeed.tech/tags/ui-freezes.md>)

### AI overview

JetBrains Marketplace now provides UI freeze reports to plugin authors whose plugins are identified in IDE error reports. The article explains how to enable reporting, inspect grouped reports and thread dumps, and investigate causes such as work on the event dispatch thread or background read actions that block UI progress. It also describes using an AI coding agent with the diagnostic data and cautions readers to verify its findings against the dumps and code.

### Source excerpt

A user reports that the IDE stopped responding, and your plugin is the prime suspect. You try the same steps, but everything works. Without more details, such as a thread dump captured during the freeze, it's hard to know where to start. JetBrains Marketplace now gives plugin authors access to UI freeze reports attributed to [...]

## Working in Kotlin: Waiting Around with Coroutines

DevFeed: [Working in Kotlin: Waiting Around with Coroutines](<https://devfeed.tech/articles/working-in-kotlin-waiting-around-with-coroutines-64814.md>)

Original publisher: [Read original article](<https://spin.atomicobject.com/kotlin-waiting-coroutines/>)

Author: Matt Soto

Published: 2026-10-05T12:00:12Z

Content type: tutorial

Language: en

Sources: [Atomic Object](<https://devfeed.tech/sources/atomic-object.md>)

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

Tags: [await](<https://devfeed.tech/tags/await.md>), [cancellation](<https://devfeed.tech/tags/cancellation.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [delay](<https://devfeed.tech/tags/delay.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [platforms-languages](<https://devfeed.tech/tags/platforms-languages.md>)

### AI overview

This Kotlin tutorial explains how coroutines suspend without blocking threads, how to overlap independent operations with async and await, and how coroutineScope provides structured concurrency and cancellation. It also clarifies that suspend does not make blocking code nonblocking and discusses Dispatchers.IO for blocking I/O.

### Source excerpt

In part one of this series, I discussed the pros and cons of using Kotlin. In part two, let's talk about waiting. Your application probably does a lot of it. Waiting for a database, waiting for an API, waiting for a second API because apparently the first one didn't have enough information. Our computers are [...] The post Working in Kotlin: Waiting Around with Coroutines appeared first on Atomic Spin.

## Iterative data loading in Swift

DevFeed: [Iterative data loading in Swift](<https://devfeed.tech/articles/iterative-data-loading-in-swift-62248.md>)

Original publisher: [Read original article](<https://swiftwithmajid.com/2026/09/29/iterative-data-loading-in-swift/>)

Author: Majid Jabrayilov (cmecid@gmail.com)

Published: 2026-09-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Swift with Majid](<https://devfeed.tech/sources/swift-with-majid.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [lazy loading](<https://devfeed.tech/topics/lazy-loading.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [function](<https://devfeed.tech/tags/function.md>), [functions](<https://devfeed.tech/tags/functions.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-ios-development-apple-watch-iphone-ipad-swiftui-macos-uikit-dev-wwdc-tutorial-guide-redux-tea](<https://devfeed.tech/tags/swift-ios-development-apple-watch-iphone-ipad-swiftui-macos-uikit-dev-wwdc-tutorial-guide-redux-tea.md>)

### AI overview

The article explains an iterative approach to loading health data in a Swift app that makes 40-50 asynchronous HealthKit requests. It describes using an AsyncSequence to run loading steps in a controlled sequence, avoiding the need to wait for every request to finish before updating the screen.

### Source excerpt

How to deal with complex features that might need 40-50 async requests to populate the screen? How might we arrange these requests to prevent overwhelming the Cooperative Thread Pool, or how could we refine concurrent tasks? This week, we will talk about the iterative data loading approach that I use in my CardioBot app.

## How Kotlin Flow Operator Fusion Works and When Ordinary Operators Break It

DevFeed: [How Kotlin Flow Operator Fusion Works and When Ordinary Operators Break It](<https://devfeed.tech/articles/i-counted-every-hidden-channel-kotlin-flow-creates-most-devs-are-wrong-about-which-operators-are-22947.md>)

Original publisher: [Read original article](<https://proandroiddev.com/i-counted-every-hidden-channel-kotlin-flow-creates-most-devs-are-wrong-about-which-operators-are-8f38cf676e07?source=rss----c72404660798---4>)

Author: Majidshahbaz

Published: 2026-09-13T05:43:21Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>)

### AI overview

This article investigates Kotlin Flow operator fusion by instrumenting the runtime and comparing pipelines with adjacent fusible operators against pipelines interrupted by an ordinary map() call. It explains that adjacent channelFlow, flowOn, buffer, and produceIn calls can share one underlying channel through FusibleFlow, while an intervening non-fusible operator causes additional wrapper structure.

### Source excerpt

Image Generated for the ArticleI Counted Every Hidden Channel Kotlin Flow Creates -- Most Devs Are Wrong About Which Operators Are Freebuffer() and flowOn() are supposed to fuse into one channel when chained. I wrote code to prove it -- and then found four "harmless" operators that quietly break it. Ask any experienced Kotlin developer what happens when you chain .buffer().flowOn(Dispatchers.IO).buffer(), and you'll usually get a confident answer: "it fuses into one channel." That's the folklore, repeated in talks, docs, and Stack Overflow answers. It's also only half true, and nobody seems to have actually checked the other half: which everyday operators quietly stop that fusion from happening. I decided to stop trusting folklore and instrument the actual runtime. Five separate experiments later, I had a very clear, very measurable answer -- and one of the results genuinely surprised me. The Myth, and the Mechanism Behind It Kotlin's coroutines library really does fuse adjacent channelFlow, flowOn, buffer, and produceIn calls into a single underlying channel instead of creating one per operator. This isn't a rumor -- it's real, deliberate behavior, implemented through an interface called FusibleFlow. Here's the actual check, straight from the source: https://medium.com/media/1cd3b407c1f2b2955b3df4be68ca18b5/href When flowOn() or buffer() is called, it checks whether the flow it's being called on already implements FusibleFlow. If it does, instead of wrapping it in a new object, it calls .fuse() -- which updates the existing object's settings (buffer size, dispatcher) in place. No new object. No new coroutine. No new channel. But that check only succeeds if the upstream is already a ChannelFlow. And that's where the folklore quietly stops being true. Building Something to Actually Measure This I wrote two nearly identical pipelines -- one where the fusible operators sit directly next to each other, and one where a completely ordinary map() sits in the middle: https://medi

## The Android Startup Pattern: A Lifecycle-Aware, Multi-Module Approach

DevFeed: [The Android Startup Pattern: A Lifecycle-Aware, Multi-Module Approach](<https://devfeed.tech/articles/the-android-startup-pattern-a-lifecycle-aware-multi-module-approach-22950.md>)

Original publisher: [Read original article](<https://proandroiddev.com/the-android-startup-pattern-a-lifecycle-aware-multi-module-approach-d0f73e367a62?source=rss----c72404660798---4>)

Author: Ehab Elwan

Published: 2026-09-13T05:31:09Z

Content type: article

Language: en

Sources: [ProAndroidDev](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [app startup](<https://devfeed.tech/topics/app-startup.md>), [Android](<https://devfeed.tech/topics/android.md>), [Dependency injection](<https://devfeed.tech/topics/dependency-injection.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-tools](<https://devfeed.tech/tags/ai-tools.md>), [android](<https://devfeed.tech/tags/android.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [api](<https://devfeed.tech/tags/api.md>), [api-key](<https://devfeed.tech/tags/api-key.md>), [app](<https://devfeed.tech/tags/app.md>), [application](<https://devfeed.tech/tags/application.md>), [approach](<https://devfeed.tech/tags/approach.md>), [apps](<https://devfeed.tech/tags/apps.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [article](<https://devfeed.tech/tags/article.md>), [background](<https://devfeed.tech/tags/background.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [ccpa](<https://devfeed.tech/tags/ccpa.md>), [class](<https://devfeed.tech/tags/class.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [mobile-architecture](<https://devfeed.tech/tags/mobile-architecture.md>), [module](<https://devfeed.tech/tags/module.md>), [pattern](<https://devfeed.tech/tags/pattern.md>), [software-architecture](<https://devfeed.tech/tags/software-architecture.md>), [startup](<https://devfeed.tech/tags/startup.md>)

### AI overview

The article proposes a DI-driven Android startup architecture that separates process startup, foreground entry, authenticated sessions, and screen-specific data loading. Feature modules contribute tasks to injected sets; a shared runner orders them by priority, runs each phase concurrently, applies timeouts, and lets critical failures halt startup while logging noncritical failures. An application-scoped initializer exposes loading, success, and fatal-error states for splash-screen handling and retry; retry safety depends on idempotent tasks. Foreground tasks use ProcessLifecycleOwner so work waits until the app enters the foreground, while session tasks run in response to logged-in auth state. Consent-sensitive SDK tasks can observe vendor consent and enable or disable collection as choices change. The article reserves Jetpack App Startup for framework libraries that do not need app business logic, warning that pre-Application initialization can precede DI and consent evaluation. Screen data is loaded lazily through a StateFlow observed with lifecycle-aware collection. It notes that tasks must be main-safe and move CPU or I/O work to appropriate dispatchers.

### Source excerpt

A Clean, DI-Driven Architecture for Managing Cold Starts, Background Wakeups, and Privacy Compliance in Modern Android Apps Image generated by AIDisclosure: This article was drafted by me and refined with the help of AI tools. Every growing Android project eventually spawns a two-headed "God Class." On one side, your Application class becomes a dumping ground for global infrastructure--third-party SDKs, crash reporters, and tracking tools. On the other side, your main entry point (typically the MainViewModel) gets choked with UI-blocking startup logic. It usually looks something like this: The Anti-Pattern: The Two-Headed God Class class MyApplication : Application() { override fun onCreate() { super.onCreate() // The framework dumping ground CrashReportingSDK.getInstance().setCollectionEnabled(true) HeavyUiSDK.initialize(context = this, ...) AnalyticsSDK.initialize(this, "API_KEY") // ... 50 more lines of spaghetti } }class MainViewModel : ViewModel() { init { // The UI-blocking dumping ground updateRemoteConfigs() checkUserSessionToken() processPendingDeepLinks() prefetchHomeFeedData() // ... UI cannot render until this finishes } } Splitting initialization across these two files creates major problems: It breaks the Single Responsibility Principle: The app's entry points are forced to orchestrate the inner workings of every single feature, tightly coupling your modules. It ignores process lifecycles: Application tasks run indiscriminately on every silent background wakeup, while MainViewModel tasks fail to re-trigger when the app returns to the foreground. It destroys testability: Hardcoding SDK initializations directly into your entry points makes it incredibly difficult to write isolated unit tests without complicated mocking setups. It complicates privacy compliance: A centralized dumping ground makes it extremely difficult to dynamically suspend tracking SDKs until user consent under global privacy regulations (such as GDPR, CCPA, and CPRA) is explicitly grant

## Introducing worker topologies for self-hosted Appwrite

DevFeed: [Introducing worker topologies for self-hosted Appwrite](<https://devfeed.tech/articles/introducing-worker-topologies-for-self-hosted-appwrite-16446.md>)

Original publisher: [Read original article](<https://appwrite.io/blog/post/announcing-worker-topologies>)

Author: Atharva Deosthale

Published: 2026-09-07T00:00:00Z

Content type: release

Language: en

Sources: [Appwrite Blog](<https://devfeed.tech/sources/appwrite-blog.md>)

Topics: [Appwrite](<https://devfeed.tech/topics/appwrite.md>), [Self-hosted](<https://devfeed.tech/topics/self-hosted.md>), [container](<https://devfeed.tech/topics/container.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Docker Compose](<https://devfeed.tech/topics/docker-compose.md>)

Tags: [announcements](<https://devfeed.tech/tags/announcements.md>), [compose](<https://devfeed.tech/tags/compose.md>), [container](<https://devfeed.tech/tags/container.md>), [containers](<https://devfeed.tech/tags/containers.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [self-hosted](<https://devfeed.tech/tags/self-hosted.md>)

### AI overview

Appwrite introduces two worker topologies for self-hosted instances. The combined topology is now the default and runs background work in two containers, while the separate topology preserves one container per queue and scheduler for installations needing independent scaling or resource controls.

### Source excerpt

Self-hosted Appwrite now runs all background workers in a single container by default. Learn how the combined topology works and when to scale out with separate workers.

## WorkOS announces Agent Registration, Airlock, Relay, and native iOS and Android SDKs

DevFeed: [WorkOS announces Agent Registration, Airlock, Relay, and native iOS and Android SDKs](<https://devfeed.tech/articles/august-updates-26793.md>)

Original publisher: [Read original article](<https://workos.com/blog/august-2026-updates>)

Author: WorkOS

Published: 2026-09-02T00:00:00Z

Content type: release

Language: en

Sources: [WorkOS](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [SDK](<https://devfeed.tech/topics/sdk.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Authorization](<https://devfeed.tech/topics/authorization.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Claude](<https://devfeed.tech/topics/claude.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [codex](<https://devfeed.tech/topics/codex.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [authorization](<https://devfeed.tech/tags/authorization.md>), [await](<https://devfeed.tech/tags/await.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [ios](<https://devfeed.tech/tags/ios.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [sdks](<https://devfeed.tech/tags/sdks.md>), [swift](<https://devfeed.tech/tags/swift.md>), [updates](<https://devfeed.tech/tags/updates.md>)

### AI overview

WorkOS announces August updates including Agent Registration for scoped, short-lived credentials, Airlock for authorizing AI-agent actions, Relay for proxying third-party application requests, and native Swift and Kotlin SDKs for iOS and Android.

### Source excerpt

Agent Registration, Airlock, Relay, iOS & Android SDKs, & more

## Hyperloop B: the coroutine engine behind Appwrite 2.0

DevFeed: [Hyperloop B: the coroutine engine behind Appwrite 2.0](<https://devfeed.tech/articles/hyperloop-b-the-coroutine-engine-behind-appwrite-2-0-16482.md>)

Original publisher: [Read original article](<https://appwrite.io/blog/post/hyperloop-b>)

Author: Luke B. Silver

Published: 2026-08-31T00:00:00Z

Content type: article

Language: en

Sources: [Appwrite Blog](<https://devfeed.tech/sources/appwrite-blog.md>)

Topics: [Appwrite](<https://devfeed.tech/topics/appwrite.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [PHP](<https://devfeed.tech/topics/php.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>)

Tags: [architectures](<https://devfeed.tech/tags/architectures.md>), [backend](<https://devfeed.tech/tags/backend.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [memory](<https://devfeed.tech/tags/memory.md>), [php](<https://devfeed.tech/tags/php.md>), [platform](<https://devfeed.tech/tags/platform.md>), [process](<https://devfeed.tech/tags/process.md>), [redis](<https://devfeed.tech/tags/redis.md>)

### AI overview

The article explains Hyperloop B, a coroutine-based engine behind Appwrite 2.0. It describes how yielding during I/O lets one process serve many concurrent requests, reporting 7x higher requests per second and 6x lower memory use on an I/O-bound benchmark.

### Source excerpt

Hyperloop B is the Swoole coroutine engine behind Appwrite 2.0. Here is what it is, the concurrency problem it solves, and the 7x I/O throughput it buys.

## Native Async/Coroutine Reads in RocksDB

DevFeed: [Native Async/Coroutine Reads in RocksDB](<https://devfeed.tech/articles/native-async-coroutine-reads-in-rocksdb-22403.md>)

Original publisher: [Read original article](<http://rocksdb.org/blog/2026/08/24/native-coroutine-reads.html>)

Author: Josh Kang

Published: 2026-08-24T00:00:00Z

Content type: article

Language: en

Sources: [RocksDB](<https://devfeed.tech/sources/rocksdb.md>)

Topics: [rocksdb](<https://devfeed.tech/topics/rocksdb.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [async](<https://devfeed.tech/topics/async.md>), [io\_uring](<https://devfeed.tech/topics/io-uring.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [application](<https://devfeed.tech/tags/application.md>), [applications](<https://devfeed.tech/tags/applications.md>), [async](<https://devfeed.tech/tags/async.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [await](<https://devfeed.tech/tags/await.md>), [based](<https://devfeed.tech/tags/based.md>), [benefit](<https://devfeed.tech/tags/benefit.md>), [block](<https://devfeed.tech/tags/block.md>), [blog](<https://devfeed.tech/tags/blog.md>), [but](<https://devfeed.tech/tags/but.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [cache](<https://devfeed.tech/tags/cache.md>), [callback](<https://devfeed.tech/tags/callback.md>), [can](<https://devfeed.tech/tags/can.md>), [column](<https://devfeed.tech/tags/column.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [native](<https://devfeed.tech/tags/native.md>), [rocksdb](<https://devfeed.tech/tags/rocksdb.md>)

### AI overview

RocksDB 11.10.0 adds experimental coroutine-based `Get` and `MultiGet` APIs that can suspend cache-missed reads while storage is busy, letting a small read executor run other requests and maintain storage queue depth. The APIs target throughput for I/O-bound point lookups; they do not make individual device reads faster. `DB::GetAsync` and `DB::MultiGetAsync` complete through callbacks, while `CoroDB::CoGet` and `CoroDB::CoMultiGet` return lazy Folly tasks. Native execution requires a Folly build with `USE_COROUTINES=1` and filesystem support for `GetReadExecutor` and `SubmitReadAsync`; `ReadOptions::async_io` is not required and serves a separate synchronous `MultiGet` path. Callers must keep referenced inputs and outputs alive through completion, and submitted reads cannot currently be cancelled. In the reported benchmark, coroutines used a four-thread executor across 4, 20, 40, and 60 tasks. They could be slower when there was little parallel I/O to expose, but larger `MultiGet` batches let them overtake synchronous reads; gains flattened near CPU saturation. The excerpt gives no numerical throughput results.

### Source excerpt

A point lookup that misses RocksDB's block cache can spend most of its time waiting for storage. The traditional way to keep more reads in flight is to add threads. That works, but each outstanding read parks a thread, carries a stack, and adds context-switching overhead. RocksDB now has experimental asynchronous Get and MultiGet APIs backed by native C++ coroutines. When a read reaches storage, RocksDB can suspend the request, let its read-executor worker run another ready task, and resume the request when the filesystem reports completion. A small executor can therefore maintain more storage queue depth without requiring one blocked application thread per read. These APIs are available in RocksDB 11.10.0. This is primarily a throughput feature for I/O-bound point lookups. It does not make an individual device read faster. Its benefit comes from keeping the device busy and using CPU threads for runnable work. The API surface RocksDB exposes the new read path through two public interfaces: DB::GetAsync and DB::MultiGetAsync return immediately on the native path and report completion through AsyncCallback::OnComplete. CoroDB::CoGet and CoroDB::CoMultiGet return lazy folly::coro::Task objects. CoGet produces a Status; CoMultiGet fills the same per-key values and statuses as synchronous MultiGet. The callback APIs suit applications that do not expose Folly tasks at their boundaries. The CoroDB APIs let coroutine-based callers await RocksDB directly, avoiding an application-side callback-to-Baton adapter and its extra completion handoff. Native execution requires RocksDB to be built with Folly and USE_COROUTINES=1. Neither interface requires ReadOptions::async_io. That flag continues to control the older internal async-I/O optimizations for synchronous MultiGet and iterators. The task APIs are lazy: no read begins until a task is awaited or started. Both interfaces take pointer and reference parameters, so keep the DB, column-family handles, ReadOptions, keys and their

## Add sign-in to an Android app with the WorkOS Android SDK

DevFeed: [Add sign-in to an Android app with the WorkOS Android SDK](<https://devfeed.tech/articles/add-sign-in-to-an-android-app-with-the-workos-android-sdk-16062.md>)

Original publisher: [Read original article](<https://workos.com/blog/sign-in-to-an-android-app-with-the-workos-android-sdk>)

Author: WorkOS

Published: 2026-08-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [WorkOS](<https://devfeed.tech/sources/workos-blog.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [SDK](<https://devfeed.tech/topics/sdk.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [pkce](<https://devfeed.tech/topics/pkce.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [API keys](<https://devfeed.tech/topics/api-keys.md>), [Security](<https://devfeed.tech/topics/security.md>), [Maven Central](<https://devfeed.tech/topics/maven-central.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [api-keys](<https://devfeed.tech/tags/api-keys.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [flow](<https://devfeed.tech/tags/flow.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [maven-central](<https://devfeed.tech/tags/maven-central.md>), [pkce](<https://devfeed.tech/tags/pkce.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [security](<https://devfeed.tech/tags/security.md>), [sign-in](<https://devfeed.tech/tags/sign-in.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial shows how to add WorkOS AuthKit sign-in to a Kotlin Android app using the WorkOS Android SDK. It covers the Gradle dependency, Chrome Custom Tab authentication, custom-scheme redirects, PKCE token exchange, session storage and refresh, and logout without embedding a client secret in the APK.

### Source excerpt

Build a complete AuthKit flow in Kotlin, from Gradle dependency to signed-out state, with no client secret in your APK.

## How R8 made Kotlin Coroutines on Android 2x faster

DevFeed: [How R8 made Kotlin Coroutines on Android 2x faster](<https://devfeed.tech/articles/how-r8-made-kotlin-coroutines-on-android-2x-faster-4227.md>)

Original publisher: [Read original article](<https://android-developers.googleblog.com/2026/07/how-r8-made-kotlin-coroutines-2x-faster.html>)

Author: Android Developers (noreply@blogger.com)

Published: 2026-07-27T13:00:00Z

Content type: article

Language: en

Sources: [Android Developers](<https://devfeed.tech/sources/android-developers-blog.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [R8](<https://devfeed.tech/topics/r8.md>), [Android](<https://devfeed.tech/topics/android.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-gradle-plugin](<https://devfeed.tech/tags/android-gradle-plugin.md>), [app-performance](<https://devfeed.tech/tags/app-performance.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>), [r8](<https://devfeed.tech/tags/r8.md>)

### AI overview

This article explains how R8 optimization in AGP 9.2.0 improves Kotlin coroutines performance on Android. By optimizing AtomicFieldUpdater calls, the change makes launching and cancelling coroutines up to twice as fast, addressing coroutine-related bottlenecks in Jetpack Compose and other Android operations.

### Source excerpt

Posted by Andrei Shikov, Senior Software Engineer, Android Toolkit and Jonathan Starup, Software Engineer, R8 Team Starting from AGP 9.2.0, R8 optimizes most Atomic*FieldUpdater calls into Unsafe variants that perform 2x to 4x better on common operations. This has a particularly large impact on the kotlinx.atomicfu library that implements atomics for kotlinx.coroutines, making launching and cancelling coroutines up to 2x faster. In order to get the benefits, update your AGP to 9.2.0 or above. With the majority of Android apps adopting Kotlin as their main language of choice, kotlinx.coroutines has become a de-facto standard for asynchronous programming. The library offers a well-designed and structured way of managing concurrent flows that is native to Kotlin. Jetpack Compose was no exception, adopting coroutines for managing pointer events, animations and other interactions. At the time of writing, most concurrent APIs in Compose call suspend functions under the hood and are launching and/or cancelling coroutines to handle updates. As the Compose team started to investigate performance, coroutines were discovered to be a bottleneck for many operations that happen outside of composition. As an example, 80% of the time spent on creating and updating Modifier.clickable was consumed by launching and cancelling internal coroutines that handled InteractionSource updates. Based on those observations, much of early performance work was focused on removing coroutines from the default path and delaying initialization until necessary. The cost of a coroutine The easiest way to analyze a function's internal behavior on Android is to capture an Android Runtime (ART) method trace. An ART method trace is a tool that records the execution flow of an app, showing exactly which methods are called, their order, and how much time is spent in each, allowing developers to identify performance bottlenecks. For an empty LaunchedEffect { } call, it would look something like this: LaunchedE

## Bring your KMP library to NuGet

DevFeed: [Bring your KMP library to NuGet](<https://devfeed.tech/articles/bring-your-kmp-library-to-nuget-25915.md>)

Original publisher: [Read original article](<https://proandroiddev.com/bring-your-kmp-library-to-nuget-02e1131a4707?source=rss-43bae76e8f81------2>)

Author: Isuru Rajapakse

Published: 2026-07-19T13:17:14Z

Content type: release

Language: en

Sources: [Isuru Rajapakse](<https://devfeed.tech/sources/stories-by-isuru-rajapakse-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [NuGet](<https://devfeed.tech/topics/nuget.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [coroutines-flow](<https://devfeed.tech/topics/coroutines-flow.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>)

Tags: [abi](<https://devfeed.tech/tags/abi.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [c-sharp](<https://devfeed.tech/tags/c-sharp.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [coroutines-flow](<https://devfeed.tech/tags/coroutines-flow.md>), [dotnet](<https://devfeed.tech/tags/dotnet.md>), [ffi](<https://devfeed.tech/tags/ffi.md>), [flow](<https://devfeed.tech/tags/flow.md>), [generics](<https://devfeed.tech/tags/generics.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [kmp](<https://devfeed.tech/tags/kmp.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [library](<https://devfeed.tech/tags/library.md>), [net](<https://devfeed.tech/tags/net.md>), [nuget](<https://devfeed.tech/tags/nuget.md>), [nuget-package](<https://devfeed.tech/tags/nuget-package.md>)

### AI overview

kotlin-native-nuget is an experimental Gradle plugin for packaging Kotlin/Native libraries as NuGet packages with generated C# bindings, and for generating Kotlin bindings to selected C# NuGet APIs. For Kotlin-to-C#, it processes the public API at build time, generates an Interop.cs file, compiles target-specific shared libraries, and packages both for .NET; consumers need no extra tooling. The article shows mappings for classes, enums, data classes, collections, generics, nullable values, interfaces, suspend functions, Flow, and cancellation. Runtime calls cross the C ABI through P/Invoke. In the reverse direction, developers select C# namespaces and can use generated Kotlin-idiomatic bindings. The author cautions that the plugin is 0.x and experimental, reverse support is still developing, and some Kotlin constructs are unsupported.

### Source excerpt

with kotlin-native-nuget plugin, you can bring your Kotlin to C# idiomaticallyhttps://medium.com/media/0f185efc67390bbf440bfc33f5675f42/href A little while ago, I gave a talk where I tried to take a library written in Kotlin and hand it to a .NET developer as a NuGet package. By hand. It is 30 minutes of me walking into every brick wall you can imagine - the C ABI, marshalling strings, keeping objects alive across the boundary, making any of it look like C# a human would actually want to use. Introducing kotlin-native-nuget 🪟kotlin-native-nuget plugin auto-binds your kotlin api into C# I turned all of that into a plugin, so you don't have to hit a single one of those walls. You write Kotlin, and out the other side comes a NuGet package with a proper, idiomatic C# API: classes, enums, data classes, coroutines, Flow, generics, interfaces, the works. No FFI boilerplate, no hand-written [DllImport], no "here's a C header, good luck". Your friends over in .NET just `dotnet add package` it and use it like it was C# all along. It's called kotlin-native-nuget, and it's a Gradle plugin. Here's the pitch: GitHub - xxfast/kotlin-native-nuget: A plugin that packages a Kotlin/Native library as a NuGet package with generated C# bindings, and consumes C# NuGet packages from Kotlin The pitch 🛗plugins { kotlin("multiplatform") id("io.github.xxfast.kotlin.native.nuget") version "<version>" } kotlin { mingwX64 { binaries { sharedLib { baseName = "mycatlib" } } } macosArm64 { binaries { sharedLib { baseName = "mycatlib" } } } } nuget { publish { packageId = "MyCatLib" version = "1.0.0" authors = "yourname" description = "My Kotlin/Native library" rootPackage = "com.example.cats" } } That's it. Add the plugin, point it at your native targets, and run the publish task. Out pops a .nupkg. Why though? 🤔 It's a fair question. I got it a lot (even on that talk) Kotlin Multiplatform already reaches an absurd number of places: the JVM, Android, iOS, JS, Wasm, and native desktop. But there's th

## Structured Concurrency

DevFeed: [Structured Concurrency](<https://devfeed.tech/articles/structured-concurrency-39377.md>)

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

Published: 2026-04-13T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Structured concurrency](<https://devfeed.tech/topics/structured-concurrency.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>)

Tags: [coroutines](<https://devfeed.tech/tags/coroutines.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [processes](<https://devfeed.tech/tags/processes.md>), [structured-concurrency](<https://devfeed.tech/tags/structured-concurrency.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A Kotlin-focused guide to structured concurrency explains how coroutine hierarchies establish ownership and completion guarantees. It covers cancellation of child coroutines, avoiding unnecessary work and resource leaks, awaiting completion, and handling errors.

### Source excerpt

The only guide to structured concurrency you'll ever need.

## Don't Block Suspend Functions

DevFeed: [Don't Block Suspend Functions](<https://devfeed.tech/articles/don-t-block-suspend-functions-32247.md>)

Original publisher: [Read original article](<https://publicobject.com/2026/01/22/dont-block-suspend-functions/>)

Author: Jesse Wilson

Published: 2026-01-22T04:32:49Z

Content type: tutorial

Language: en

Sources: [Public Object](<https://devfeed.tech/sources/public-object.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [async](<https://devfeed.tech/topics/async.md>), [Job](<https://devfeed.tech/topics/job.md>), [IO](<https://devfeed.tech/topics/io.md>)

Tags: [async](<https://devfeed.tech/tags/async.md>), [await](<https://devfeed.tech/tags/await.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [dispatcher](<https://devfeed.tech/tags/dispatcher.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This Kotlin tutorial explains why blocking calls inside suspend functions can prevent other coroutines from running. It contrasts preemptive thread concurrency with cooperative coroutine concurrency and recommends avoiding blocking functions in suspending code, using the I/O dispatcher when necessary, and avoiding runBlocking.

### Source excerpt

Here's a program that launches 3 jobs. The first runs forever and the other two exchange a value. @Test fun test() = runTest { val channel = Channel<String>() val deferredA = async { while (isActive) { delay(1_000) } } val deferredB = async { channel.send("hello") } val deferredC = async { channel.receive() } deferredB.await(

## How to Prevent Race Conditions in Coroutines

DevFeed: [How to Prevent Race Conditions in Coroutines](<https://devfeed.tech/articles/how-to-prevent-race-conditions-in-coroutines-25006.md>)

Original publisher: [Read original article](<https://typealias.com/articles/prevent-race-conditions-in-coroutines/>)

Author: author@typealias.com (Dave Leeds)

Published: 2025-11-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

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

Tags: [actor](<https://devfeed.tech/tags/actor.md>), [atomicint](<https://devfeed.tech/tags/atomicint.md>), [atomics](<https://devfeed.tech/tags/atomics.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [limitedparallelism](<https://devfeed.tech/tags/limitedparallelism.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [programming](<https://devfeed.tech/tags/programming.md>), [race-condition](<https://devfeed.tech/tags/race-condition.md>), [shared-mutable-state](<https://devfeed.tech/tags/shared-mutable-state.md>), [state](<https://devfeed.tech/tags/state.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [structured-concurrency](<https://devfeed.tech/tags/structured-concurrency.md>)

### AI overview

This tutorial explains that Kotlin coroutines and structured concurrency do not automatically protect shared mutable state from race conditions. It introduces the issue using an example that creates 100,000 random bakery orders.

### Source excerpt

Thanks to structured concurrency, there are a lot of concerns that we don't have to handle manually when working with Kotlin coroutines. For example, parent coroutines automatically wait for their children to complete before completing themselves. And when a parent coroutine is cancelled, its children are automatically cancelled, too. But when it comes to shared mutable state - mutable data that multiple coroutines could update at the same time - there's nothing magical in the design of coroutines to ensure that the state is updated properly.

## Kotlin Coroutines Compared with Reactor for Sequential and Asynchronous Operations

DevFeed: [Kotlin Coroutines Compared with Reactor for Sequential and Asynchronous Operations](<https://devfeed.tech/articles/coroutines-vs-reactor-when-elegance-and-simplicity-crush-complexity-39263.md>)

Original publisher: [Read original article](<https://kt.academy/article/coroutines-vs-reactor>)

Published: 2025-10-06T00:00:00Z

Content type: comparison

Language: en

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

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Reactive Streams](<https://devfeed.tech/topics/reactive-streams.md>), [RxJava](<https://devfeed.tech/topics/rxjava.md>), [async/await](<https://devfeed.tech/topics/async-await.md>), [Android](<https://devfeed.tech/topics/android.md>), [Back end](<https://devfeed.tech/topics/backend.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [async](<https://devfeed.tech/tags/async.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [await](<https://devfeed.tech/tags/await.md>), [backend](<https://devfeed.tech/tags/backend.md>), [compare](<https://devfeed.tech/tags/compare.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>), [reactive-streams](<https://devfeed.tech/tags/reactive-streams.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [simple](<https://devfeed.tech/tags/simple.md>), [time](<https://devfeed.tech/tags/time.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This article compares Kotlin Coroutines with Reactor for backend and Android development. It argues that coroutines provide more readable and straightforward syntax for sequential and asynchronous operations, while Reactor requires additional operators, concepts, and patterns.

### Source excerpt

A comparison of Kotlin Coroutines and Reactor, highlighting the elegance and simplicity of Coroutines over the complexity of Reactor.

## Suspending functions into blocking functions or CompletableFuture

DevFeed: [Suspending functions into blocking functions or CompletableFuture](<https://devfeed.tech/articles/suspending-functions-into-blocking-functions-or-completablefuture-39325.md>)

Original publisher: [Read original article](<https://kt.academy/article/interop-coroutines-to-blocking>)

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

Content type: tutorial

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Java](<https://devfeed.tech/topics/java.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [blocking](<https://devfeed.tech/tags/blocking.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A guide to converting suspending functions into blocking functions or CompletableFuture in Kotlin Coroutines, with advice for APIs used by Java or non-coroutine Kotlin callers.

### Source excerpt

A guide on how to correctly convert suspending functions into blocking functions or CompletableFuture in Kotlin Coroutines.

## 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>)

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.

## Coroutines Party Tricks

DevFeed: [Coroutines Party Tricks](<https://devfeed.tech/articles/coroutines-party-tricks-32244.md>)

Original publisher: [Read original article](<https://publicobject.com/2025/06/25/coroutines-party-tricks/>)

Author: Jesse Wilson

Published: 2025-06-25T12:00:00Z

Content type: tutorial

Language: en

Sources: [Public Object](<https://devfeed.tech/sources/public-object.md>)

Topics: [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [developer](<https://devfeed.tech/tags/developer.md>), [droidcon](<https://devfeed.tech/tags/droidcon.md>), [presentation](<https://devfeed.tech/tags/presentation.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

A Droidcon NYC presentation explores unconventional Android coroutine techniques after covering coroutine implementation details, scopes, and contexts. It discusses slowing I/O, restructuring code, using reflection, and treating the user as a function.

### Source excerpt

I presented this at Droidcon NYC on June 25, 2025. Available as code, video, slides, Droidtube, & Speaker Deck. Coroutines are an important tool in the Android developer's toolbox. We use 'em to background our tasks, to parallelize our work, and to gracefully cancel operations. This is not a

[Next page](<https://devfeed.tech/topics/coroutines.md?cursor=WyIyMDI1LTA2LTI1VDEyOjAwOjAwKzAwOjAwIiwgIjQ3Y2NkMThmLTJjOTEtNDk1ZC1iNTg2LTA5OWM4ZDE3YjAzMyJd>)