# multithreading

Published articles for multithreading.

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

## Releasing Execution Contexts

DevFeed: [Releasing Execution Contexts](<https://devfeed.tech/articles/releasing-execution-contexts-22337.md>)

Original publisher: [Read original article](<https://crystal-lang.org/2026/07/12/releasing-execution-contexts/>)

Author: Julien Portalier

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

Content type: release

Language: en

Sources: [Crystal](<https://devfeed.tech/sources/crystal.md>)

Topics: [Crystal](<https://devfeed.tech/topics/crystal.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [context](<https://devfeed.tech/topics/context.md>), [cpu](<https://devfeed.tech/topics/cpu.md>)

Tags: [concurrent](<https://devfeed.tech/tags/concurrent.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

Crystal is introducing Execution Contexts, an interface for orchestrating fibers across one or more threads. The article describes concurrent and parallel contexts, configurable parallelism, and execution across CPU cores while preserving a single-threaded default.

### Source excerpt

Two and a half years ago, with the invaluable support from 84codes, we re-examined the multithreading model inherited from Crystal 0.28 (preview MT).

## Introducing Skia Graphite: Chrome's rasterization backend for the future

DevFeed: [Introducing Skia Graphite: Chrome's rasterization backend for the future](<https://devfeed.tech/articles/introducing-skia-graphite-chrome-s-rasterization-backend-for-the-future-4195.md>)

Original publisher: [Read original article](<https://blog.chromium.org/2025/07/introducing-skia-graphite-chromes.html>)

Author: Chromium Blog (noreply@blogger.com)

Published: 2025-07-08T17:46:00Z

Content type: article

Language: en

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

Topics: [Chrome](<https://devfeed.tech/topics/chrome.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [Interaction to Next Paint](<https://devfeed.tech/topics/interaction-to-next-paint.md>), [browser](<https://devfeed.tech/topics/browser.md>), [OpenGL](<https://devfeed.tech/topics/opengl.md>), [shaders](<https://devfeed.tech/topics/shaders.md>), [Web](<https://devfeed.tech/topics/web.md>), [glsl](<https://devfeed.tech/topics/glsl.md>)

Tags: [chrome](<https://devfeed.tech/tags/chrome.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [graphics-apis](<https://devfeed.tech/tags/graphics-apis.md>), [interaction-to-next-paint](<https://devfeed.tech/tags/interaction-to-next-paint.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [none](<https://devfeed.tech/tags/none.md>), [performance](<https://devfeed.tech/tags/performance.md>), [render](<https://devfeed.tech/tags/render.md>), [screen](<https://devfeed.tech/tags/screen.md>), [shaders](<https://devfeed.tech/tags/shaders.md>), [the-fast-and-the-curious](<https://devfeed.tech/tags/the-fast-and-the-curious.md>), [vulkan](<https://devfeed.tech/tags/vulkan.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

The article introduces Skia Graphite, a new GPU rasterization backend for Chrome on Apple Silicon Macs. Graphite uses fewer code paths, supports modern graphics APIs such as Metal, Vulkan, and D3D12, and is multithreaded by default. It improved Motionmark 1.3 scores by almost 15% on a MacBook Pro M3 and improved several real-world performance metrics.

### Source excerpt

Today's The Fast and the Curious post covers the launch of Skia's new rasterization backend, Graphite, in Chrome on Apple Silicon Macs. Graphite is instrumental in helping Chrome achieve exceptional scores on Motionmark 1.3 and is key to unlocking a ton of future improvements in Chrome Graphics. A brief history of Skia in Chrome In Chrome, Skia is used to render paint commands from Blink and the browser UI into pixels on your screen, a process called rasterization. Skia has powered Chrome Graphics since the very beginning. Skia eventually ran into performance issues as the web evolved and became more complex, which led Chrome and Skia to invest in a GPU accelerated rasterization backend called Ganesh. Over the years, Ganesh matured into a solid highly performant rasterization backend and GPU rasterization launched on all platforms in Chrome on top of GL (via ANGLE on Windows D3D9/11). However, Ganesh always had a GL-centric design with too many specialized code paths and the team was hitting a wall when trying to implement optimizations that took advantage of modern graphics APIs in a principled manner. This set the stage for the team to rethink GPU rasterization from the ground up in the form of a new rasterization backend, Graphite. Graphite was developed from the start to be principled by having fewer and more comprehensible code paths. This forward looking design helps take advantage of modern graphics APIs like Metal, Vulkan and D3D12 and paradigms like compute based path rasterization, and is multithreaded by default. Results With Graphite in Chrome, we increased our Motionmark 1.3 scores by almost 15% on a Macbook Pro M3. At the same time, we improved real world metrics like INP (interaction to next paint time), LCP (time to largest contentful paint), graphics smoothness (percent dropped frames), GPU process malloc memory usage, and others. This all means substantially smoother interactions, less stutter when scrolling, and less time waiting for sites to show

## Using Clojure channels to increase throughput

DevFeed: [Using Clojure channels to increase throughput](<https://devfeed.tech/articles/using-clojure-channels-to-increase-throughput-30521.md>)

Original publisher: [Read original article](<https://medium.com/helpshift-engineering/using-clojure-channels-to-increase-throughput-c051cc7f9893?source=rss----3229f31ca4f4---4>)

Author: Abhinav Dubey

Published: 2025-05-28T10:07:12Z

Content type: tutorial

Language: en

Sources: [Helpshift](<https://devfeed.tech/sources/helpshift.md>)

Topics: [Clojure](<https://devfeed.tech/topics/clojure.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Kafka](<https://devfeed.tech/topics/kafka.md>), [benchmarking](<https://devfeed.tech/topics/benchmarking.md>), [async](<https://devfeed.tech/topics/async.md>), [Grafana](<https://devfeed.tech/topics/grafana.md>)

Tags: [benchmarking](<https://devfeed.tech/tags/benchmarking.md>), [channel](<https://devfeed.tech/tags/channel.md>), [clojure](<https://devfeed.tech/tags/clojure.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [core-async](<https://devfeed.tech/tags/core-async.md>), [grafana](<https://devfeed.tech/tags/grafana.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>)

### AI overview

This tutorial explains how to increase throughput in a Clojure-based Kafka consumer by using core.async channels and multiple worker threads. It compares a single-threaded baseline with configurations using three and ten workers, reporting shorter processing times for 1,000 events in the described benchmark.

### Source excerpt

When building systems that process large volumes of messages synchronously, performance bottlenecks can quickly become a challenge specially with single-threaded designs. In this post, we'll look at how leveraging worker threads in a Clojure-based Kafka consumer can significantly boost throughput & reduce total processing time. Using simple concurrency primitives, it's possible to achieve parallelism & scale gracefully, all while keeping the codebase clean & maintainable. We'll start with a baseline, introduce worker threads using Clojure's core.async & measure the impact. Setup & Context Kafka & Zookeeper For observability: Grafana Kafka producer: A simple script that sends messages to a Kafka topic at a configurable rate (messages per minute) for a fixed duration. After each event is pushed, a counter metric is emitted Kafka consumer: A simple script that listens to a topic & consumes messages & simulates processing time finding square-root of a number (henceforth, assume that it takes ~1 second to find the square root) . A counter metric is emitted after processing each message The Baseline: Single-Threaded Consumer If each message takes t seconds to process & there are n messages, total processing time becomes n x t seconds. This provides a clean baseline to evaluate the impact of using channel moving forward. Adding workers with core.asyncValues are conveyed on queue-like channels. By default channels require producer and consumer to rendezvous for the transfer of a value through the channel https://clojuredocs.org/clojure.core.async To improve throughput, we introduce parallelism using Clojure's core.async channels. Messages from Kafka are fed into a channel, & multiple worker threads read from this channel to process messages concurrently Here, we used >!! (blocking put) & <!! (blocking take) to communicate via channels & future to execute the business-logic on a separate thread Who gets blocked & when : The thread putting message into the channel will get bl

## Python 3.13 without GIL: Real-World Threading Finally Works

DevFeed: [Python 3.13 without GIL: Real-World Threading Finally Works](<https://devfeed.tech/articles/python-3-13-without-gil-real-world-threading-finally-works-43.md>)

Original publisher: [Read original article](<https://blog.abhimanyu-saharan.com/posts/making-the-gil-optional-a-deep-dive-into-pep-703>)

Author: Abhimanyu Saharan

Published: 2025-05-23T00:00:00Z

Content type: article

Language: en

Sources: [Abhimanyu Saharan](<https://devfeed.tech/sources/abhimanyu-s-blog.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Python 3.13](<https://devfeed.tech/topics/python-3-13.md>)

Tags: [install](<https://devfeed.tech/tags/install.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [python](<https://devfeed.tech/tags/python.md>), [python-3-13](<https://devfeed.tech/tags/python-3-13.md>), [threading](<https://devfeed.tech/tags/threading.md>)

### AI overview

An examination of Python 3.13's optional GIL, including installation steps, measured multithreading gains, and situations where threading outperforms multiprocessing.

### Source excerpt

Tested Python 3.13's optional GIL. Shared results showing real multithreading gains, install steps, and when it outperforms multiprocessing.

## Understanding Dispatchers: Main and Main.immediate

DevFeed: [Understanding Dispatchers: Main and Main.immediate](<https://devfeed.tech/articles/understanding-dispatchers-main-and-main-immediate-25756.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/understanding-dispatchers-main-and-mainimmediate/>)

Author: Shreyas Patil

Published: 2025-04-02T12:22:06Z

Content type: tutorial

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-apps](<https://devfeed.tech/tags/android-apps.md>), [android-studio](<https://devfeed.tech/tags/android-studio.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [coroutines-flow](<https://devfeed.tech/tags/coroutines-flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginner](<https://devfeed.tech/tags/kotlin-beginner.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>), [threadpools](<https://devfeed.tech/tags/threadpools.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

A deep dive into Kotlin coroutine dispatchers on Android, explaining the difference between Dispatchers.Main and Dispatchers.Main.immediate. It describes how HandlerContext dispatches work and when execution is posted to the main thread or performed synchronously on the current thread.

### Source excerpt

A deep dive into Kotlin Coroutine Dispatchers. Understand the subtle but important difference between Dispatchers.Main and Dispatchers.Main.immediate in Android.

## Worker Pooling -- 5x performance for CPU-intensive JavaScript workloads

DevFeed: [Worker Pooling -- 5x performance for CPU-intensive JavaScript workloads](<https://devfeed.tech/articles/worker-pooling-5x-performance-for-cpu-intensive-javascript-workloads-17862.md>)

Original publisher: [Read original article](<https://encore.dev/blog/worker-pooling>)

Author: André Eriksson

Published: 2024-12-13T00:00:00Z

Content type: release

Language: en

Sources: [Encore Updates](<https://devfeed.tech/sources/encore-updates.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Scalability](<https://devfeed.tech/topics/scalability.md>)

Tags: [javascript](<https://devfeed.tech/tags/javascript.md>), [launch](<https://devfeed.tech/tags/launch.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [performance](<https://devfeed.tech/tags/performance.md>), [process](<https://devfeed.tech/tags/process.md>), [processes](<https://devfeed.tech/tags/processes.md>), [scalability](<https://devfeed.tech/tags/scalability.md>)

### AI overview

Encore.ts introduces Worker Pooling mode for CPU-intensive JavaScript workloads. It combines its multi-threaded Rust runtime with multiple Node.js worker threads to distribute HTTP requests and Pub/Sub messages across event loops, with reported improvements of up to 5x in tested applications.

### Source excerpt

Launch Week Day 5

## Fearless Concurrency Ep.6: Understanding Rust ARC for Efficient Multithreading

DevFeed: [Fearless Concurrency Ep.6: Understanding Rust ARC for Efficient Multithreading](<https://devfeed.tech/articles/fearless-concurrency-ep-6-understanding-rust-arc-for-efficient-multithreading-22270.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/11/fearless-concurrency-ep6-understanding-rust-arc-for-efficient-multithreading.html>)

Published: 2024-11-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Rust](<https://devfeed.tech/topics/rust.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [arc-best-practices](<https://devfeed.tech/tags/arc-best-practices.md>), [arc-for-performance](<https://devfeed.tech/tags/arc-for-performance.md>), [arc-in-rust](<https://devfeed.tech/tags/arc-in-rust.md>), [arc-memory-management](<https://devfeed.tech/tags/arc-memory-management.md>), [arc-ownership-model](<https://devfeed.tech/tags/arc-ownership-model.md>), [arc-shared-resources](<https://devfeed.tech/tags/arc-shared-resources.md>), [arc-vs-garbage-collection](<https://devfeed.tech/tags/arc-vs-garbage-collection.md>), [arc-with-mutex](<https://devfeed.tech/tags/arc-with-mutex.md>), [arc-with-rwlock](<https://devfeed.tech/tags/arc-with-rwlock.md>), [atomic](<https://devfeed.tech/tags/atomic.md>), [atomic-reference-counting](<https://devfeed.tech/tags/atomic-reference-counting.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrency-in-rust](<https://devfeed.tech/tags/concurrency-in-rust.md>), [efficient-multithreading-rust](<https://devfeed.tech/tags/efficient-multithreading-rust.md>), [examples](<https://devfeed.tech/tags/examples.md>), [interior-mutability-arc](<https://devfeed.tech/tags/interior-mutability-arc.md>), [lightweight-memory-management](<https://devfeed.tech/tags/lightweight-memory-management.md>), [memory](<https://devfeed.tech/tags/memory.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [multithreading-with-arc](<https://devfeed.tech/tags/multithreading-with-arc.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [rust](<https://devfeed.tech/tags/rust.md>), [rust-arc-tutorial](<https://devfeed.tech/tags/rust-arc-tutorial.md>), [rust-arc-use-cases](<https://devfeed.tech/tags/rust-arc-use-cases.md>), [rust-concurrency-tools](<https://devfeed.tech/tags/rust-concurrency-tools.md>), [rust-shared-ownership](<https://devfeed.tech/tags/rust-shared-ownership.md>), [rust-thread-safe-programming](<https://devfeed.tech/tags/rust-thread-safe-programming.md>), [thread-safe-data-sharing](<https://devfeed.tech/tags/thread-safe-data-sharing.md>), [use-cases](<https://devfeed.tech/tags/use-cases.md>)

### AI overview

This tutorial explains Rust's Atomic Reference Counting (Arc) for sharing ownership of data across threads. It covers reference-counted memory management, cloning, performance implications, common pitfalls such as circular references, and use cases including shared configuration and database connection pools.

### Source excerpt

Introduction: Welcome to Episode 6 of the Fearless Concurrency in Rust series! In this episode, we explore the powerful concept of ARC (Atomic Reference Counting) and its critical role in managing shared resources in multithreaded Rust programs. By leveraging ARC, developers can safely share ownership of data across threads without relying on a traditional garbage collector, enabling efficient, flexible, and scalable concurrency. What is ARC?: Understanding Atomic Reference Counting as a lightweight, manual garbage collection system.

## Collecting items from the Flow in chunks💦

DevFeed: [Collecting items from the Flow in chunks💦](<https://devfeed.tech/articles/collecting-items-from-the-flow-in-chunks-25706.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/collecting-items-from-the-flow-in-chunks/>)

Author: Shreyas Patil

Published: 2023-10-23T04:46:23Z

Content type: tutorial

Language: en

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

Topics: [kotlin-flow](<https://devfeed.tech/topics/kotlin-flow.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>)

Tags: [collect](<https://devfeed.tech/tags/collect.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [flow](<https://devfeed.tech/tags/flow.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>), [kotlin-flow](<https://devfeed.tech/tags/kotlin-flow.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [reactive-programming](<https://devfeed.tech/tags/reactive-programming.md>)

### AI overview

A practical guide to collecting Kotlin Flow items in time-based chunks without losing produced data. It explains why batching high-frequency analytics events can reduce the cost of repeated database or network operations and outlines an operator implementation.

### Source excerpt

Learn how to collect Kotlin Flow items in chunks or intervals without losing data. A practical guide to handling high-frequency data streams efficiently.

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

## Exploring "select" expression of Kotlin coroutines

DevFeed: [Exploring "select" expression of Kotlin coroutines](<https://devfeed.tech/articles/exploring-select-expression-of-kotlin-coroutines-25719.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/exploring-select-expression-of-kotlin-coroutines/>)

Author: Shreyas Patil

Published: 2022-09-27T14:29:44Z

Content type: tutorial

Language: en

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

Topics: [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Application Development](<https://devfeed.tech/topics/application-development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apis](<https://devfeed.tech/tags/apis.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [examples](<https://devfeed.tech/tags/examples.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>), [multithreading](<https://devfeed.tech/tags/multithreading.md>)

### AI overview

A tutorial on Kotlin Coroutines' select expression, which allows multiple suspending functions or channel operations to be awaited concurrently and selects the first result that becomes available. It explains the select builder and demonstrates use cases involving concurrent data loading, UI interactions, and channels.

### Source excerpt

Learn how to use the 'select' expression in Kotlin Coroutines to await multiple suspending functions and select the first one that completes.

## Apollo Kotlin: New Multiplatform Memory Manager

DevFeed: [Apollo Kotlin: New Multiplatform Memory Manager](<https://devfeed.tech/articles/apollo-kotlin-new-multiplatform-memory-manager-23202.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/apollo-kotlin-new-multiplatform-memory-manager>)

Author: Benoit Lubek

Published: 2022-08-09T12:05:22Z

Content type: news

Language: en

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

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [kotlin-multiplatform-libraries](<https://devfeed.tech/topics/kotlin-multiplatform-libraries.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [apollo](<https://devfeed.tech/tags/apollo.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [immutability](<https://devfeed.tech/tags/immutability.md>), [kotlin](<https://devfeed.tech/tags/kotlin.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>), [mobile](<https://devfeed.tech/tags/mobile.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [performance](<https://devfeed.tech/tags/performance.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

Apollo Kotlin 3.5.0 adopts Kotlin Native's new memory manager. The change removes several threading and immutability restrictions, including the requirement to access the library exclusively from the Main thread on Apple targets. Initial benchmarks indicate performance improvements of up to 45%.

### Source excerpt

Back in May, we shared about how Apollo Kotlin started supporting the Hierarchical project structure. Following the Kotlin Multiplatform ecosystem, here is some more news, this time about the new Memory Manager. Kotlin Native's Memory Manager Since its early days, Kotlin Native has had specific rules regarding multithreading and immutability: - objects could only be accessed from the thread they were created in - unless they had been "frozen", in which case they could be accessed by multiple...

## Combining StateFlows and transforming it into a StateFlow

DevFeed: [Combining StateFlows and transforming it into a StateFlow](<https://devfeed.tech/articles/combining-stateflows-and-transforming-it-into-a-stateflow-25707.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/combining-stateflows-and-transforming-it-into-a-stateflow/>)

Author: Shreyas Patil

Published: 2022-06-24T12:30:00Z

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [coroutine](<https://devfeed.tech/tags/coroutine.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>)

### AI overview

A Kotlin tutorial about combining multiple StateFlows into a derived StateFlow. It explains limitations of existing Flow-combining approaches, including conversion requirements such as a scope and separately calculated initial state.

### Source excerpt

Master the art of combining multiple StateFlows into a single transformed StateFlow. Explore utilities and best practices for managing complex states in Kotlin.

## Leveraging the Semaphore concept in Coroutines to limit the parallelism 🔀

DevFeed: [Leveraging the Semaphore concept in Coroutines to limit the parallelism 🔀](<https://devfeed.tech/articles/leveraging-the-semaphore-concept-in-coroutines-to-limit-the-parallelism-25734.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/leveraging-the-semaphore-concept-in-coroutines-to-limit-the-parallelism/>)

Author: Shreyas Patil

Published: 2022-04-01T12:57:35Z

Content type: tutorial

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent-programming](<https://devfeed.tech/tags/concurrent-programming.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [synchronization](<https://devfeed.tech/tags/synchronization.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

A tutorial explaining semaphores in Kotlin coroutines, including binary and counting semaphores, and how permits limit parallel access to shared resources.

### Source excerpt

Explore the concept of Semaphores in Kotlin Coroutines. Learn how to limit parallelism and manage resource access in concurrent programming.

## Android Worldwide: January 2022

DevFeed: [Android Worldwide: January 2022](<https://devfeed.tech/articles/android-worldwide-january-2022-28365.md>)

Original publisher: [Read original article](<https://siddroid.com/post/community/event-android-worldwide-january-2022/>)

Author: Siddhesh Patil

Published: 2022-01-26T18:32:16Z

Content type: article

Language: en

Sources: [Sid Patil - Android Engineer and Kotlin Advocate](<https://devfeed.tech/sources/sid-patil-android-engineer-and-kotlin-advocate.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [SQLite](<https://devfeed.tech/topics/sqlite.md>), [Database](<https://devfeed.tech/topics/database.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>)

Tags: [ana-zharkova](<https://devfeed.tech/tags/ana-zharkova.md>), [android](<https://devfeed.tech/tags/android.md>), [android-events-in-mumbai](<https://devfeed.tech/tags/android-events-in-mumbai.md>), [android-talks-2022](<https://devfeed.tech/tags/android-talks-2022.md>), [ash-davis](<https://devfeed.tech/tags/ash-davis.md>), [best-android-developer-communities](<https://devfeed.tech/tags/best-android-developer-communities.md>), [better-gradle-dependencies](<https://devfeed.tech/tags/better-gradle-dependencies.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [ed-george](<https://devfeed.tech/tags/ed-george.md>), [gabor-varadi](<https://devfeed.tech/tags/gabor-varadi.md>), [gde-talks](<https://devfeed.tech/tags/gde-talks.md>), [gdg-groups](<https://devfeed.tech/tags/gdg-groups.md>), [gema-rodriguez](<https://devfeed.tech/tags/gema-rodriguez.md>), [improving-gradle](<https://devfeed.tech/tags/improving-gradle.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kmm](<https://devfeed.tech/tags/kmm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-for-ios](<https://devfeed.tech/tags/kotlin-for-ios.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-mumbai](<https://devfeed.tech/tags/kotlin-mumbai.md>), [kotlin-user-groups](<https://devfeed.tech/tags/kotlin-user-groups.md>), [kshitij-chauhan](<https://devfeed.tech/tags/kshitij-chauhan.md>), [mohit-sarveiya](<https://devfeed.tech/tags/mohit-sarveiya.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [performance](<https://devfeed.tech/tags/performance.md>), [rashanjyot-arora](<https://devfeed.tech/tags/rashanjyot-arora.md>), [room](<https://devfeed.tech/tags/room.md>), [ryan-kay](<https://devfeed.tech/tags/ryan-kay.md>), [sdk](<https://devfeed.tech/tags/sdk.md>), [shared-flows-in-kotlin](<https://devfeed.tech/tags/shared-flows-in-kotlin.md>), [sierra-obryan](<https://devfeed.tech/tags/sierra-obryan.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [william-shelor](<https://devfeed.tech/tags/william-shelor.md>)

### AI overview

Android Worldwide announces its January 25-26, 2022 sessions, covering Kotlin Multiplatform memory management, SQLite and Room performance, and full-text search. The article also introduces the event speakers and participating communities.

### Source excerpt

We kickstart 2022 at Android Worldwide with a two days session on January 25th & 26th. This quarter we cover different topics ranging from managing memory at multiplatform level with Kotlin, maxing out the performance of your SQLite database, implementing FTS for faster database querying and much more!

## False Sharing

DevFeed: [False Sharing](<https://devfeed.tech/articles/false-sharing-24842.md>)

Original publisher: [Read original article](<https://alidg.me/blog/2020/5/1/false-sharing>)

Author: Alimate

Published: 2020-05-01T00:00:00Z

Content type: article

Language: en

Sources: [Ali Dehghan - Kemikit](<https://devfeed.tech/sources/ali-dehghan-kemikit.md>)

Topics: [Latency](<https://devfeed.tech/topics/latency.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [latency](<https://devfeed.tech/tags/latency.md>), [memory](<https://devfeed.tech/tags/memory.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [padding](<https://devfeed.tech/tags/padding.md>)

### AI overview

This article explains how false sharing in multithreaded JVM applications can increase latency and throughput costs. It uses benchmarks and object-layout analysis to show how padding can isolate counters and improve performance.

### Source excerpt

Measuring false-sharing effect on latency and throughput

## Awaitility

DevFeed: [Awaitility](<https://devfeed.tech/articles/awaitility-27316.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201910/awaitility/>)

Published: 2019-10-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Library](<https://devfeed.tech/topics/library.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [async](<https://devfeed.tech/topics/async.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [examples](<https://devfeed.tech/tags/examples.md>), [executorservice](<https://devfeed.tech/tags/executorservice.md>), [library](<https://devfeed.tech/tags/library.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [queue](<https://devfeed.tech/tags/queue.md>), [testing](<https://devfeed.tech/tags/testing.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This tutorial introduces Awaitility, a small library for testing asynchronous code. It explains how Awaitility can express expectations for multithreaded systems concisely, using a producer-consumer example with a queue.

### Source excerpt

If you are not working with multithreading programming and don't have to test any asynchronous code then this post will probably do you nothing good. But if you have ever struggled with testing some logic running in multiple threads and you don't know Awaitility. A small library helps testing asynchronous code. If you've never heard of it then you should continue reading. Read more

## Fastest way to profile a method in Ruby

DevFeed: [Fastest way to profile a method in Ruby](<https://devfeed.tech/articles/fastest-way-to-profile-a-method-in-ruby-41342.md>)

Original publisher: [Read original article](<https://samsaffron.com/archive/2017/10/18/fastest-way-to-profile-a-method-in-ruby>)

Author: Sam Saffron

Published: 2017-10-18T00:21:47Z

Content type: tutorial

Language: en

Sources: [Sam Saffron](<https://devfeed.tech/sources/sam-saffron.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [multithreading](<https://devfeed.tech/topics/multithreading.md>), [Process](<https://devfeed.tech/topics/process.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [profile](<https://devfeed.tech/tags/profile.md>), [redis](<https://devfeed.tech/tags/redis.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

This Ruby tutorial compares methods for measuring elapsed time and patching methods for instrumentation. It finds that Process.clock_gettime with CLOCK_MONOTONIC is faster and more accurate than using Time.now in the presented benchmarks, and discusses alternatives for instrumenting code without source-level changes.

### Source excerpt

Lately I needed to add some instruments into Discourse. I wanted every request to measure: How many SQL statements and Redis commands are executed? How much time was spent in those sections? This can easily be abstracted to a more generalized problem of class ExternalClass def method_to_measure end end Solving this problem breaks down into a few particular sub-problems What is the fastest way of measuring elapsed time in a method? What is the fastest patch to a method that can add instrumentation? How does one account for multithreading? Fastest way to measure a method The first and simplest problem to solve is pretending we do not have to patch anything. If we had access to all the source and could add all the instruments we wanted to, what is the quickest way of measuring elapsed time? There are two techniques we can use in Ruby. Create a Time object before and after and delta. Use Process.clock_gettime to return a Float before and after and delta. Let's measure: require 'benchmark/ips' class Test attr_reader :count, :duration def initialize @count = 0 @duration = 0.0 end def work end def method work end def time_method @count += 1 t = Time.now work ensure @duration += Time.now - t end def process_clock_get_time_method @count += 1 t = Process.clock_gettime(Process::CLOCK_MONOTONIC) work ensure @duration += Process.clock_gettime(Process::CLOCK_MONOTONIC) - t end end t = Test.new Benchmark.ips do |b| b.report "method" do |times| i = 0 while i < times t.method i += 1 end end b.report "time_method" do |times| i = 0 while i < times t.time_method i += 1 end end b.report "process_clock_get_time_method" do |times| i = 0 while i < times t.process_clock_get_time_method i += 1 end end end # Calculating ------------------------------------- # method 19.623M (± 3.5%) i/s - 98.227M in 5.012204s # time_method 1.596M (± 1.2%) i/s - 8.061M in 5.050321s # process_clock_get_time_method # 4.972M (± 1.7%) i/s - 24.908M in 5.011634s As expected Process.clock_gettime(Process::CLOCK_MONO

## Google SoC lwIP Report Week 12

DevFeed: [Google SoC lwIP Report Week 12](<https://devfeed.tech/articles/google-soc-lwip-report-week-12-32787.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/google-soc-lwip-report-week-12/>)

Published: 2016-08-15T00:00:00Z

Content type: article

Language: en

Sources: [Front Page on ReactOS Website](<https://devfeed.tech/sources/front-page-on-reactos-website.md>)

Topics: [lwIP](<https://devfeed.tech/topics/lwip.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [systems](<https://devfeed.tech/topics/systems.md>)

Tags: [concurrency](<https://devfeed.tech/tags/concurrency.md>), [free](<https://devfeed.tech/tags/free.md>), [google](<https://devfeed.tech/tags/google.md>), [lwip](<https://devfeed.tech/tags/lwip.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [os](<https://devfeed.tech/tags/os.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [thread](<https://devfeed.tech/tags/thread.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>)

### AI overview

A week 12 progress report on rewriting a driver to address lwIP's thread-safety problems. The author redesigns mutex usage to manage protocol control block lifetimes while balancing safe pointer access against performance and deadlock risks.

### Source excerpt

In week 10, I had completed a major rewrite of my driver. In week 11, I dove into the problem of lwIP not being thread-safe once again. While I was able to deal with most of the individual bugs that kept popping up, each one was taking me more time to solve due to the haphazard nature of my previous fixes. At the beginning of last week, it was quickly becoming more apparent that I would need to rework most of my code once again if I wanted to have any hope of circumventing the multithreeading issue once and for all.

## How Many Hours for Multithreading the Server?

DevFeed: [How Many Hours for Multithreading the Server?](<https://devfeed.tech/articles/how-many-hours-for-multithreading-the-server-36441.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/how-many-hours-for-multithreading/>)

Published: 2014-09-02T18:25:58Z

Content type: opinion

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [coding](<https://devfeed.tech/topics/coding.md>), [Software](<https://devfeed.tech/topics/software.md>), [servers](<https://devfeed.tech/topics/servers.md>)

Tags: [business](<https://devfeed.tech/tags/business.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [project-management](<https://devfeed.tech/tags/project-management.md>), [server](<https://devfeed.tech/tags/server.md>), [software-developer](<https://devfeed.tech/tags/software-developer.md>)

### AI overview

The article argues that software developers often cannot reliably estimate the hours required for individual project steps, especially when the work is new. It distinguishes detailed task estimates from whole-project commitments and discusses how padded estimates can produce misleading schedules.

### Source excerpt

How many hours for multithreading the server? Or: dealing with overly detailed project planning Many developers, me included, dread that moment. Someone sits down with you and wants to know how many "hours" each step of the project will take. And of course the thing is, if you are doing something that has been done many times before, you might be able to provide a detailed estimate. People that build houses work like this, but they still often get it wrong.

## Primer on Threading and Handlers in Android

DevFeed: [Primer on Threading and Handlers in Android](<https://devfeed.tech/articles/primer-on-threading-and-handlers-in-android-25310.md>)

Original publisher: [Read original article](<https://kau.sh/blog/primer-on-threading-and-handlers-in-android/>)

Author: Kaushik Gopal

Published: 2014-06-20T07:00:00Z

Content type: tutorial

Language: en

Sources: [Kaushik Gopal's Site](<https://devfeed.tech/sources/kaushik-gopal-s-site.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Java](<https://devfeed.tech/topics/java.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [code](<https://devfeed.tech/tags/code.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [multitasking](<https://devfeed.tech/tags/multitasking.md>), [multithreading](<https://devfeed.tech/tags/multithreading.md>), [processor](<https://devfeed.tech/tags/processor.md>), [threading](<https://devfeed.tech/tags/threading.md>)

### AI overview

This tutorial introduces threading for Android applications, explains how threads support asynchronous or parallel processing in Java, and begins discussing Android's main thread and Handlers.

### Source excerpt

Mobile devices are getting pretty fast, but they aren't infinitely fast yet. If you want your app to be able to do any serious work without affecting the user experience by locking up the interface, you'll have to resort to running things in parallel. On Android, this is done with "threads". Grab yourself a cup of coffee and read this post line by line. I'll introduce you to the concept of threads, talk about how Java uses threads and explain how "Handlers" in Android help with threading. Whenever you want to do asynchronous/parallel processing, you do it with threads. Threads you say ? ## A thread or "thread of execution" is basically a sequence of instructions (of program code), that you send to your operating system. Image Courtesy: Wikipedia. "Typically" your CPU can process one thread, per core, at any time. So a multi-core processor (most Android devices today) by definition can handle multiple-threads of execution (which is to say, they can do multiple things at once). Truth to multi-core processing and single-core multitasking ## I say "typically" because the corollary to the above statement is not necessarily true. Single-core devices can "simulate" multithreading using multitasking. Every "task" that's run on a thread can be broken down into multiple instructions. These instructions don't have to happen all at once. So a single-core device can switch to a thread "1" finish an instruction 1A, then switch to thread "2" finish an instruction 2A, switch back to 1 finish 1B, 1C, 1D, switch to 2, finish 2B, 2C and so on... This switching between threads happens so fast that it appears, even on a single-core device, that all the threads are making progress at exactly the same time. It's an illusion caused by speed, much like Agent Brown appearing to have multiple heads and arms. Now on to some code. Threads in core Java ## In Java, when you want to do parallel processing, you execute your code in a Runnable either by extending the Thread class or implementing the R