# threading

Published articles for threading.

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

## Libreboot Build System Audit 3

DevFeed: [Libreboot Build System Audit 3](<https://devfeed.tech/articles/libreboot-build-system-audit-3-32663.md>)

Original publisher: [Read original article](<https://libreboot.org/news/audit3.html>)

Author: Leah Rowe

Published: 2026-09-17T04:32:50.666044Z

Content type: article

Language: en

Sources: [News about Libreboot releases and development](<https://devfeed.tech/sources/news-about-libreboot-releases-and-development.md>)

Topics: [audit](<https://devfeed.tech/topics/audit.md>), [maintenance](<https://devfeed.tech/topics/maintenance.md>), [Error Handling](<https://devfeed.tech/topics/error-handling.md>), [Shell](<https://devfeed.tech/topics/shell.md>)

Tags: [audit](<https://devfeed.tech/tags/audit.md>), [audits](<https://devfeed.tech/tags/audits.md>), [bios](<https://devfeed.tech/tags/bios.md>), [bug](<https://devfeed.tech/tags/bug.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [canoeboot](<https://devfeed.tech/tags/canoeboot.md>), [complexity](<https://devfeed.tech/tags/complexity.md>), [coreboot](<https://devfeed.tech/tags/coreboot.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [free-software](<https://devfeed.tech/tags/free-software.md>), [integrity](<https://devfeed.tech/tags/integrity.md>), [libre](<https://devfeed.tech/tags/libre.md>), [libreboot](<https://devfeed.tech/tags/libreboot.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [safety](<https://devfeed.tech/tags/safety.md>), [threading](<https://devfeed.tech/tags/threading.md>), [uefi](<https://devfeed.tech/tags/uefi.md>)

### AI overview

This article reports on Libreboot Build System Audit 3, focusing on the lbmk build system. It describes improved error handling, bug fixes, efficiency improvements, reduced complexity, stronger vendor-file integrity checks, and broader use of multithreading. The audit reduced the build system from 2,644 to 1,744 shell-script source lines compared with the previous audit, without reducing functionality.

### Source excerpt

Article: Libreboot Build System Audit 3 Web link: https://libreboot.org/news/audit3.html

## Ten Years of ITNOG

DevFeed: [Ten Years of ITNOG](<https://devfeed.tech/articles/ten-years-of-itnog-11363.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2026/04/itnog-10/>)

Published: 2026-04-22T05:25:00Z

Content type: opinion

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [networking](<https://devfeed.tech/topics/networking.md>), [VXLAN](<https://devfeed.tech/topics/vxlan.md>), [BGP](<https://devfeed.tech/topics/bgp.md>), [evpn](<https://devfeed.tech/topics/evpn.md>), [5G](<https://devfeed.tech/topics/5g.md>), [Ethernet](<https://devfeed.tech/topics/ethernet.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [5g](<https://devfeed.tech/tags/5g.md>), [bgp](<https://devfeed.tech/tags/bgp.md>), [ethernet](<https://devfeed.tech/tags/ethernet.md>), [evpn](<https://devfeed.tech/tags/evpn.md>), [latency](<https://devfeed.tech/tags/latency.md>), [networking](<https://devfeed.tech/tags/networking.md>), [sharding](<https://devfeed.tech/tags/sharding.md>), [threading](<https://devfeed.tech/tags/threading.md>), [vxlan](<https://devfeed.tech/tags/vxlan.md>)

### AI overview

A personal recap of ITNOG 10 in Bologna highlights the event's networking presentations, including VXLAN-based 5G-to-Ethernet services, security functions in EVPN/VXLAN, BGP routing optimization for 26 million paths, and hollow-core fiber technology.

### Source excerpt

I spent the last two days in Bologna at ITNOG 10 in the excellent company of Italian networking engineers (many of them personal friends) and a few guests from around the world. As always, the organizers and the program committee didn't disappoint - it was a smoothly organized, lovely event full of interesting presentations. Thanks a million to everyone involved; I'll definitely be back! Now for the highlights, starting with the ultimate catnip for the differently attentive: running two presentations in parallel on the same screen with the soundtrack distributed via headphones. I've never seen anything like that, and while it looked weird (I have no idea how the presenters took it), it turned out to be very useful, as you could easily tune out AI-washing presentations and switch to something more interesting. On the other hand, you could be faced with a hard choice of having to select one of two excellent presentations: Read more ...

## Thread-per-Core Architecture: How Context Switching and Cache Thrashing Can Reduce Throughput

DevFeed: [Thread-per-Core Architecture: How Context Switching and Cache Thrashing Can Reduce Throughput](<https://devfeed.tech/articles/thread-per-core-architecture-why-extra-threads-eventually-destroy-throughput-39572.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/20-thread-per-core-architecture/>)

Author: hello@ankit-rana.com

Published: 2026-03-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [Hardware](<https://devfeed.tech/topics/hardware.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [cache](<https://devfeed.tech/tags/cache.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [context-switch](<https://devfeed.tech/tags/context-switch.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [cpu-affinity](<https://devfeed.tech/tags/cpu-affinity.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [latency](<https://devfeed.tech/tags/latency.md>), [performance](<https://devfeed.tech/tags/performance.md>), [systems](<https://devfeed.tech/tags/systems.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

The article explains why adding threads beyond the number of physical CPU cores can reduce throughput and increase latency. It attributes the decline to scheduler context switching and cache thrashing, and recommends sizing worker pools to physical cores, using CPU affinity, and relying on non-blocking I/O.

### Source excerpt

A machine with 16 cores runs 16 streams of execution regardless of how many threads the runtime creates. Past that point the scheduler timeslices, and each context switch costs roughly 1 to 2 microseconds of bookkeeping plus the far larger hidden cost of cache thrashing as each thread evicts the previous one's working set. Size worker pools to physical cores, pin them, and use non-blocking I/O so a thread never parks a core waiting on the network.

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

## Fearless Concurrency Ep.3: Managing Threaded Programs and Data Races in Rust

DevFeed: [Fearless Concurrency Ep.3: Managing Threaded Programs and Data Races in Rust](<https://devfeed.tech/articles/fearless-concurrency-ep-3-managing-threaded-programs-and-data-races-in-rust-22260.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/10/fearless-concurrency-ep3-optimize-rust-code-with-scoped-threads-&-rayon.html>)

Published: 2024-10-10T00: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>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [advanced-rust-threading](<https://devfeed.tech/tags/advanced-rust-threading.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [efficient-parallelism-in-rust](<https://devfeed.tech/tags/efficient-parallelism-in-rust.md>), [optimize-rust-code](<https://devfeed.tech/tags/optimize-rust-code.md>), [parallel-processing-in-rust](<https://devfeed.tech/tags/parallel-processing-in-rust.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [performance](<https://devfeed.tech/tags/performance.md>), [performance-optimization-rust](<https://devfeed.tech/tags/performance-optimization-rust.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [rayon-library-rust](<https://devfeed.tech/tags/rayon-library-rust.md>), [rust](<https://devfeed.tech/tags/rust.md>), [rust-concurrency-best-practices](<https://devfeed.tech/tags/rust-concurrency-best-practices.md>), [rust-concurrency-tutorial](<https://devfeed.tech/tags/rust-concurrency-tutorial.md>), [rust-parallel-computing](<https://devfeed.tech/tags/rust-parallel-computing.md>), [rust-scientific-computing-with-threads](<https://devfeed.tech/tags/rust-scientific-computing-with-threads.md>), [rust-scoped-threads-vs-std-thread](<https://devfeed.tech/tags/rust-scoped-threads-vs-std-thread.md>), [rust-threading-strategies](<https://devfeed.tech/tags/rust-threading-strategies.md>), [rust-work-stealing-with-rayon](<https://devfeed.tech/tags/rust-work-stealing-with-rayon.md>), [safe-concurrency-in-rust](<https://devfeed.tech/tags/safe-concurrency-in-rust.md>), [safety](<https://devfeed.tech/tags/safety.md>), [scoped-threads-in-rust](<https://devfeed.tech/tags/scoped-threads-in-rust.md>), [series](<https://devfeed.tech/tags/series.md>), [techniques](<https://devfeed.tech/tags/techniques.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

Episode 3 of the Fearless Concurrency series explains scoped threads and the Rayon library in Rust. It compares standard threads, scoped threads, and Rayon, covering safe shared-data access, parallel processing of datasets, CPU workload distribution, and the risk of over-parallelization.

### Source excerpt

Introduction: Welcome to Episode 3 of the Fearless Concurrency series! In this episode, Herbert explores advanced threading techniques in Rust, focusing on scoped threads and the Rayon library to help developers build more efficient and parallelized applications. This episode is packed with practical insights on when and how to use different threading models to optimize performance and handle complex workloads. Scoped Threads: Ensuring safe access to shared data with guaranteed lifetimes for concurrent threads.

## A Python story about the GIL, threading, and replacing ProcessPoolExecutor

DevFeed: [A Python story about the GIL, threading, and replacing ProcessPoolExecutor](<https://devfeed.tech/articles/killing-the-processpoolexecutor-18551.md>)

Original publisher: [Read original article](<https://www.tinybird.co/blog/killing-the-processpoolexecutor>)

Author: Tinybird

Published: 2023-08-09T00:00:00Z

Content type: opinion

Language: en

Sources: [Tinybird](<https://devfeed.tech/sources/tinybird.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [engineering-excellence](<https://devfeed.tech/tags/engineering-excellence.md>), [python](<https://devfeed.tech/tags/python.md>), [threading](<https://devfeed.tech/tags/threading.md>)

### AI overview

A story about Python's GIL and threading, describing work to fix code that already works and replace ProcessPoolExecutor.

### Source excerpt

A story about the Python GIL, threading, and fixing code that already works.

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

## Sharing Thread Pools Across Libraries in Android Applications

DevFeed: [Sharing Thread Pools Across Libraries in Android Applications](<https://devfeed.tech/articles/reduce-reuse-recycle-your-thread-pools-25909.md>)

Original publisher: [Read original article](<https://chao2zhang.medium.com/reduce-reuse-recycle-your-thread-pools-%EF%B8%8F-81e2f54d8a1d?source=rss-d19045640fe------2>)

Author: Chao Zhang

Published: 2021-12-20T18:26:36Z

Content type: tutorial

Language: en

Sources: [Stories by Chao Zhang on Medium](<https://devfeed.tech/sources/stories-by-chao-zhang-on-medium.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Android](<https://devfeed.tech/topics/android.md>), [Library](<https://devfeed.tech/topics/library.md>), [App](<https://devfeed.tech/topics/app.md>), [Network](<https://devfeed.tech/topics/network.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app-development](<https://devfeed.tech/tags/app-development.md>), [app-performance](<https://devfeed.tech/tags/app-performance.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [memory](<https://devfeed.tech/tags/memory.md>), [okhttp](<https://devfeed.tech/tags/okhttp.md>), [overhead](<https://devfeed.tech/tags/overhead.md>), [performance](<https://devfeed.tech/tags/performance.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>), [work](<https://devfeed.tech/tags/work.md>)

### AI overview

This Android development tutorial explains how creating threads for asynchronous tasks can increase memory pressure, scheduling overhead, and context-switching costs. It discusses using thread pools and proposes configuring libraries such as OkHttp and AndroidX WorkManager to share a common pool, while considering the benefits and costs.

### Source excerpt

Photo: Héctor J. Rivas from Unsplash Real-world applications today are mostly multi-threaded. This means developers should be mindful of managing the concurrency of their applications. Mastering the threading can help boost an app's performance. On the other hand, using concurrency without fully understanding it could lead to problems that negatively impact the app's health. For Android applications, every thread is mapped to a system-level thread at runtime. Each thread costs a minimum of 64k of memory on Android, If we always create a thread for any new asynchronous task, we will create memory pressure on the app. The app performance may suffer because spawning up new threads and context switching among threads are both taking up time and resources. If a thread is referenced even if it is not active, it will be kept in memory and can't be cleaned up by the garbage collector. Thread pools can help us manage concurrency more efficiently. ThreadPoolExecutor creates a pool of worker threads and schedules the tasks for them to execute. It can grow the pool size to meet the demand as new tasks arrive, and it can shrink the pool when threads are idle and no longer need to be kept alive. Thread pool, therefore, improves the app performance by reducing the per-task overhead and controls the resource usage by bounding the resources. Thread pool seems the solution to our concurrency headache, and many libraries have adopted this technique, such as OkHttp and AndroidX WorkManager. Each library maintains its own thread pool by default. When we include these libraries in our application, since each library spins up new threads by itself without the awareness of other thread pools, we come full circle. Hundreds of threads exist in our application because those libraries do not know each other. In this story, we are going to walk through an example of configuring libraries to share a common thread pool. We will also summarize the benefits and costs of managing thread pools, as it

## Refactoring from LiveData to Coroutines & Flow

DevFeed: [Refactoring from LiveData to Coroutines & Flow](<https://devfeed.tech/articles/refactoring-from-livedata-to-coroutines-flow-25969.md>)

Original publisher: [Read original article](<https://jossiwolf.medium.com/refactoring-from-livedata-to-coroutines-flow-e73b6c59f5ad?source=rss-8efc0359e234------2>)

Author: Jossi Wolf

Published: 2020-08-24T16:29:47Z

Content type: tutorial

Language: en

Sources: [Stories by Jossi Wolf on Medium](<https://devfeed.tech/sources/stories-by-jossi-wolf-on-medium.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [coroutines-flow](<https://devfeed.tech/tags/coroutines-flow.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin-coroutines](<https://devfeed.tech/tags/kotlin-coroutines.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [migration](<https://devfeed.tech/tags/migration.md>), [network](<https://devfeed.tech/tags/network.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [threading](<https://devfeed.tech/tags/threading.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This tutorial describes migrating Android repositories from LiveData to Kotlin Coroutines and Flow. It distinguishes one-shot operations from data streams and introduces migration helpers to preserve compatibility during a gradual refactor.

### Source excerpt

If you haven't, I recommend reading my other post about LiveData in Repositories. We recently joined a new project with heavy LiveData usage, everywhere. The search for main thread blockages led us down a rabbit hole of removing a significant portion of our LiveData usages. Here's how we migrated our Repositories from LiveData. We were faced with a tough challenge: We had to migrate as quickly and smoothly as possible -- there was no time for huge interruptions. Having all our repositories and lots of helper classes use LiveData, this left us with two options: Make sure we get threading right in all places that use LiveData Replace LiveData in our Repositories Making sure we're on the right thread everywhere and continuing to use LiveData would be the solution requiring fewer changes, but we would still be using LiveData for a use case it isn't really designed for. It can not be said often enough: LiveData has nothing to do in layers not related to UI! Keep it out of Repositories, DataSources! There use Flow or RxJava and only put LiveData in your ViewModels!It was very unfortunate that this was shown by Google as best practice. 😪 https://t.co/zOnbmyJYDP Agreed, 💯! We're actually working on revamping this guide which hasn't been updated with the latest recommendations for a looong time 🙈 Our code was also quite convoluted and hard to fix, so we decided to look for another option to handle asynchronicity. In an ideal world, refactoring it would have been easier, and we probably would have stuck with LiveData had our code been less convoluted. Our main requirement was for our replacement to fit with our existing mental model -- ViewModels being able to observe data from repositories where needed. Looking at our code, we were able to categorise our LiveData use cases into two categories: One-shot LiveData, for example, network calls Streams of data (e.g. for retrieving cached data before emitting fresh data) Our Replacement We looked around for a bit and decided to go wi

## Kotlin/Native Concurrency - Touchlab

DevFeed: [Kotlin/Native Concurrency - Touchlab](<https://devfeed.tech/articles/kotlin-native-concurrency-touchlab-38280.md>)

Original publisher: [Read original article](<https://touchlab.co/kotlin-native-concurrency>)

Published: 2020-06-10T19:03:18Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [kotlin-native](<https://devfeed.tech/topics/kotlin-native.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>)

Tags: [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [state](<https://devfeed.tech/tags/state.md>), [threading](<https://devfeed.tech/tags/threading.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This mini-tutorial explains Kotlin/Native's state and concurrency model. It covers ordinary local mutable state, frozen immutable state, sharing state between threads, and the errors that occur when frozen state is changed.

### Source excerpt

A mini-tutorial together to help you better understand the state rules of Kotlin/Native, including simple, frozen, global and advanced threading.

## Thread Errors

DevFeed: [Thread Errors](<https://devfeed.tech/articles/thread-errors-19556.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/thread-errors/>)

Author: Shai Almog

Published: 2020-04-10T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Exception](<https://devfeed.tech/topics/exception.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [error-handling](<https://devfeed.tech/tags/error-handling.md>), [errors](<https://devfeed.tech/tags/errors.md>), [events](<https://devfeed.tech/tags/events.md>), [exception](<https://devfeed.tech/tags/exception.md>), [handler](<https://devfeed.tech/tags/handler.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

The article introduces a generic error-handling API for Codename One EasyThread. It describes global and per-thread error callbacks and notes that the methods are not thread-safe, must be invoked synchronously from one thread, and must not be called from the resulting callback.

### Source excerpt

I wrote before about EasyThread which makes it much easier to write multi-threaded code in Codename One. One problem in that scenario was the inability to define a generic exception handler for that scenario. With the current version of Codename One we now have a new generic error handling API for easy threads: public void addErrorListener(ErrorListener err); public static void addGlobalErrorListener(ErrorListener err); These methods add a callback for error events, either globally or for a specific thread. Notice that these methods aren't thread safe and should be invoked synchronously. So make sure to invoke them only from one thread e.g. the EDT.

## SQLite on Kotlin/Native - Kevin Galligan

DevFeed: [SQLite on Kotlin/Native - Kevin Galligan](<https://devfeed.tech/articles/sqlite-on-kotlin-native-kevin-galligan-38320.md>)

Original publisher: [Read original article](<https://touchlab.co/sqlite-on-kotlin-native>)

Published: 2018-06-25T15:02:46Z

Content type: release

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [SQLite](<https://devfeed.tech/topics/sqlite.md>), [kotlin-native](<https://devfeed.tech/topics/kotlin-native.md>), [multiplatform](<https://devfeed.tech/topics/multiplatform.md>), [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [built-by-touchlab](<https://devfeed.tech/tags/built-by-touchlab.md>), [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [featured](<https://devfeed.tech/tags/featured.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [memory](<https://devfeed.tech/tags/memory.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [press](<https://devfeed.tech/tags/press.md>), [project](<https://devfeed.tech/tags/project.md>), [release](<https://devfeed.tech/tags/release.md>), [repo](<https://devfeed.tech/tags/repo.md>), [sqlite](<https://devfeed.tech/tags/sqlite.md>), [test](<https://devfeed.tech/tags/test.md>), [threading](<https://devfeed.tech/tags/threading.md>)

### AI overview

The article announces an early release of an Android SQLite stack adapted for Kotlin/Native and usable in multiplatform projects. It describes the project structure, iOS implementation, ported tests, sample applications, and known limitations related to Kotlin/Native's memory and threading model.

### Source excerpt

We're releasing an early-ish version of Sqlite for K/N. It's a version of the Android Sqlite stack for K/N, that can be used in multiplatform projects.

## Kotlin/Native (Stranger) Threads - Kevin Galligan

DevFeed: [Kotlin/Native (Stranger) Threads - Kevin Galligan](<https://devfeed.tech/articles/kotlin-native-stranger-threads-kevin-galligan-38281.md>)

Original publisher: [Read original article](<https://touchlab.co/kotlin-native-stranger-threads>)

Published: 2018-05-11T20:31:45Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

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

Tags: [clang](<https://devfeed.tech/tags/clang.md>), [clion](<https://devfeed.tech/tags/clion.md>), [code-sharing](<https://devfeed.tech/tags/code-sharing.md>), [concurrency](<https://devfeed.tech/tags/concurrency.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>), [thoughts](<https://devfeed.tech/tags/thoughts.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

The first chapter of a series on threading in Kotlin/Native introduces its thread and state model, recommends CLion for experimentation, and guides readers through creating and running a Kotlin/Native HelloWorld project. It previews Workers, data passing, and data freezing.

### Source excerpt

This is going to be a multi-part series on threading in Kotlin Native. To build a reasonably functional product, understanding threads is critical.

## Using Android Architecture Components with Firebase Realtime Database (Part 3)

DevFeed: [Using Android Architecture Components with Firebase Realtime Database (Part 3)](<https://devfeed.tech/articles/using-android-architecture-components-with-firebase-realtime-database-part-3-16248.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2017/12/using-android-architecture-components_22>)

Author: Doug Stevenson

Published: 2017-12-22T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Realtime Database](<https://devfeed.tech/topics/realtime-database.md>), [Firebase](<https://devfeed.tech/topics/firebase.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-architecture](<https://devfeed.tech/tags/android-architecture.md>), [architecture-components](<https://devfeed.tech/tags/architecture-components.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [net-conf](<https://devfeed.tech/tags/net-conf.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [realtime-database](<https://devfeed.tech/tags/realtime-database.md>), [threading](<https://devfeed.tech/tags/threading.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

### AI overview

This tutorial explains how lifecycle-aware Android Architecture Components work with Firebase Realtime Database. It focuses on LiveData and ViewModel, threading for expensive data manipulation, and the performance cost of removing and re-adding database listeners during Activity configuration changes.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Friday Q&A 2017-10-27: Locks, Thread Safety, and Swift: 2017 Edition

DevFeed: [Friday Q&A 2017-10-27: Locks, Thread Safety, and Swift: 2017 Edition](<https://devfeed.tech/articles/friday-q-a-2017-10-27-locks-thread-safety-and-swift-2017-edition-30624.md>)

Original publisher: [Read original article](<http://www.mikeash.com/pyblog/friday-qa-2017-10-27-locks-thread-safety-and-swift-2017-edition.html>)

Author: Mike Ash

Published: 2017-10-27T11:28:00Z

Content type: article

Language: en

Sources: [Mike Ash](<https://devfeed.tech/sources/mike-ash.md>)

Topics: [Swift](<https://devfeed.tech/topics/swift.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Deadlock](<https://devfeed.tech/topics/deadlock.md>), [Objective-C](<https://devfeed.tech/topics/objective-c.md>)

Tags: [concurrent](<https://devfeed.tech/tags/concurrent.md>), [deadlock](<https://devfeed.tech/tags/deadlock.md>), [locks](<https://devfeed.tech/tags/locks.md>), [mutex](<https://devfeed.tech/tags/mutex.md>), [objective-c](<https://devfeed.tech/tags/objective-c.md>), [safety](<https://devfeed.tech/tags/safety.md>), [swift](<https://devfeed.tech/tags/swift.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

An updated guide to locks and thread safety in Swift, covering mutex types, their behavior, and related Apple and Objective-C synchronization facilities.

### Source excerpt

Back in the dark ages of Swift 1, I wrote an article about locks and thread safety in Swift. The march of time has made it fairly obsolete, and reader Seth Willits suggested I update it for the modern age, so here it is! (Read More)

## Live Video Transmuxing/Transcoding: FFmpeg vs TwitchTranscoder, Part II

DevFeed: [Live Video Transmuxing/Transcoding: FFmpeg vs TwitchTranscoder, Part II](<https://devfeed.tech/articles/live-video-transmuxing-transcoding-ffmpeg-vs-twitchtranscoder-part-ii-20453.md>)

Original publisher: [Read original article](<https://medium.com/twitch-news/live-video-transmuxing-transcoding-ffmpeg-vs-twitchtranscoder-part-ii-4973f475f8a3?source=rss----3ae745429979--engineering>)

Author: Yueshi Shen

Published: 2017-10-23T21:08:55Z

Content type: article

Language: en

Sources: [Twitch](<https://devfeed.tech/sources/twitch.md>)

Topics: [FFmpeg (Fast Forward Moving Picture Experts Group)](<https://devfeed.tech/topics/ffmpeg.md>), [Transcodings](<https://devfeed.tech/topics/transcodings.md>), [Code](<https://devfeed.tech/topics/code.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [ffmpeg](<https://devfeed.tech/tags/ffmpeg.md>), [files](<https://devfeed.tech/tags/files.md>), [function](<https://devfeed.tech/tags/function.md>), [loops](<https://devfeed.tech/tags/loops.md>), [message-queue](<https://devfeed.tech/tags/message-queue.md>), [programming](<https://devfeed.tech/tags/programming.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

This second part of a two-part series examines FFmpeg Release 3.3's threading model and transcoding pipeline for a one-input, multiple-output scenario. It traces how FFmpeg orchestrates I/O, filtering, decoding, encoding, and output processing, and reports that the number of input files determines input-thread creation, so a one-input scenario uses a single thread.

### Source excerpt

By: Jeff Gong, Software Engineer, jeffgon@twitch.tv Sahil Dhanju, Software Engineer Intern Chih-Chiang Lu, Senior Software Engineer, chihchil@twitch.tv Yueshi Shen, Principal Research Engineer, yshen@twitch.tv Special thanks go to: Christopher Kennedy, Staff Video Engineer at Crunchyroll/Ellation John Nichols, Principal Software Engineer at Xilinx, jnichol@xilinx.com for their information on FFmpeg and reviewing this article. Note: This is the second part of a 2-part series. Make sure you read Part 1 first. FFmpeg's 1-In-N-Out Pipeline. Why doesn't it handle the technical issues discussed earlier? How does FFmpeg programmatically deal with instances where a single input stream is required to generate multiple transcoded and/or transmuxed outputs? We went directly into the latest FFmpeg Release 3.3. source code in order to understand its threading model and transcoding pipeline. In the top-level ffmpeg.c file, the transcode() function (line 4544) loops and repeatedly calls transcode_step() (line 4478) until its inputs are completely processed, or until the user interrupts the execution. Transcode_step() wraps the main pipeline and orchestrates file I/O, filtering, decoding and encoding amongst many other immediate steps. During the initial setup phase, init_input_threads() (line 4020) is called, and based on the number of input files, a number of new threads may be spawned to process the input. if (nb_input_files == 1) { return 0;}for (i = 0; i < nb_input_files; i++) { ... ret = av_thread_message_queue_alloc(&f->in_thread_queue, f->thread_queue_size, sizeof(AVPacket)); // line 4033} In line 4033, we see that the number of threads spawned is solely determined by the number of inputs. This means FFmpeg will process a 1-in-N-out scenario using only a single thread. In get_input_packet() (line 4055), the multithreaded companion function get_input_packet_mt() (line 4047) is only called if the number of input files is greater than one. get_input_packet_mt() can read input

## Android LiveData API: a quick look

DevFeed: [Android LiveData API: a quick look](<https://devfeed.tech/articles/android-livedata-api-a-quick-look-24816.md>)

Original publisher: [Read original article](<https://akarnokd.blogspot.com/2017/10/android-livedata-api-quick-look.html>)

Author: David Karnok (noreply@blogger.com)

Published: 2017-10-19T13:45:00Z

Content type: tutorial

Language: en

Sources: [Akarnokd - Advanced RxJava](<https://devfeed.tech/sources/akarnokd-advanced-rxjava.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Library](<https://devfeed.tech/topics/library.md>), [Streams](<https://devfeed.tech/topics/streams.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [backpressure](<https://devfeed.tech/tags/backpressure.md>), [cancellation](<https://devfeed.tech/tags/cancellation.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [flow](<https://devfeed.tech/tags/flow.md>), [flowable](<https://devfeed.tech/tags/flowable.md>), [google](<https://devfeed.tech/tags/google.md>), [lifecycle](<https://devfeed.tech/tags/lifecycle.md>), [lifecycle-components](<https://devfeed.tech/tags/lifecycle-components.md>), [livedata](<https://devfeed.tech/tags/livedata.md>), [reactive](<https://devfeed.tech/tags/reactive.md>), [release](<https://devfeed.tech/tags/release.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>), [subscription](<https://devfeed.tech/tags/subscription.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [ui](<https://devfeed.tech/tags/ui.md>)

### AI overview

This article provides a quick technical overview of Android LiveData, explaining its main-thread requirements, lifecycle-aware observer behavior, observer removal, and interoperability with Reactive Streams. It notes that LiveData was considered beta and could change before release.

### Source excerpt

Introduction Threading and lifecycle are one of the top concerns when developing applications for the Android platform. UI has to be interacted with on a dedicated thread (main thread) but in order to keep the UI responsible to user input and rendering, blocking or CPU intensive calculations should be kept off it. In addition, views can get destroyed and recreated in a way that is outside of a given application's control unlike a desktop Swing application. This means background tasks must be stopped and listeners removed to prevent leaking references to now logically dead objects. RxJava and RxAndroid can help with threading concerns and there are other libraries that tap into the various lifecycle events; in general, this means someone will call dispose() on a particular flow or clear() on a CompositeDisposable to mass-cancel multiples of them. Having a rich set of transformative and coordinating operators along with support for normal values, errors and finite sequences may be overwhelming compared to a classical Listener-based API. Google's LiveData is one of such classical Listener style APIs but unlike Swing's ActionListener for example, there are explicit requirements that interaction with the LiveData object itself happens on the main thread and signals will be dispatched from the main thread to Observers to it. LiveData API Unfortunately, I wasn't able to locate a public repository for the LiveData sources and had to rely on the sources downloaded from Google's Maven repository: compile "android.arch.lifecycle:reactivestreams:1+" There is an interoperation library associated with LiveData that allows presenting and consuming events from any Reactive-Streams Publisher. This will transitively import the actual LiveData library. Note that LiveData is currently considered beta and may change arbitrarily before release. That said, I don't think the core structure and premise will actually change. The main consumer type is the android.arch.lifecycle.Observer with

## Java 9 Flow API: switching threads

DevFeed: [Java 9 Flow API: switching threads](<https://devfeed.tech/articles/java-9-flow-api-switching-threads-24811.md>)

Original publisher: [Read original article](<https://akarnokd.blogspot.com/2017/09/java-9-flow-api-switching-threads.html>)

Author: David Karnok (noreply@blogger.com)

Published: 2017-09-21T10:49:00Z

Content type: tutorial

Language: en

Sources: [Akarnokd - Advanced RxJava](<https://devfeed.tech/sources/akarnokd-advanced-rxjava.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Java 9](<https://devfeed.tech/topics/java-9.md>), [API](<https://devfeed.tech/topics/api.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [executor](<https://devfeed.tech/tags/executor.md>), [executorservice](<https://devfeed.tech/tags/executorservice.md>), [flow](<https://devfeed.tech/tags/flow.md>), [flow-api](<https://devfeed.tech/tags/flow-api.md>), [idea](<https://devfeed.tech/tags/idea.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [java](<https://devfeed.tech/tags/java.md>), [java-9](<https://devfeed.tech/tags/java-9.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [observeon](<https://devfeed.tech/tags/observeon.md>), [publisher](<https://devfeed.tech/tags/publisher.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This tutorial explains how to switch execution between threads in reactive flows using Java 9's Flow API. It compares embedding thread switching in operators with a separate observeOn stage, then outlines an observeOn implementation based on Executor, asynchronous boundaries, bounded queues, and request management.

### Source excerpt

Introduction Ensuring certain computations happen on the right thread, usually off the main thread, is a very common development task when dealing with reactive flows. When building up tools for Java 9's Flow API, one can decide to add this thread-switching support to each operator directly - see the range() operator from the start of the series -, or have a standalone stage for this purpose. This is a tradeoff. Inlining thread switching avoids bogging down the source thread like the thread-stealing behavior of most of the queue-drain approach presented so far. A separate operator allows better composition and may even allow working with exotic asynchrony-providing components. The observeOn operator In Java, threading support is provided via the Executor, ExecutorService and ScheduledExecutorService-based API. Executor is is the most basic one of them which only provides a single execute(Runnable) method. This allows creating an Executor from a lambda: Executor trampoline = Runnable::run; Executor swing = SwingUtilities::invokeLater; Executor pool = ForkJoinPool.commonPool(); As the least common denominator, we'll use Executor in defining our observeOn operator: public static <T> Flow.Publisher<T> observeOn( Flow.Publisher<T> source, Executor exec, int prefetch) { return new ObserveOnPublisher<>(source, exec, prefetch); } Crossing an asynchronous boundary requires the temporary storage of an event until the other side can pick it up. The queue-drain approach can provide a nice bounded queue we can size with prefetch. In addition, the so-called stable-prefetch request management (shown in the mapFilter operator before) allows minimizing the overhead of requesting more items. First, let's see the skeleton of the operator's main Flow.Subscriber implementation: static final class ObserveOnSubscriber<T> implements Flow.Subscriber<T>, Flow.Subscription, Runnable { final Flow.Subscriber<? super T> downstream; final Executor exec; final int prefetch; final Queue<T> queue; F

## Easy Thread: Simplifying Communication Between Threads and the EDT

DevFeed: [Easy Thread: Simplifying Communication Between Threads and the EDT](<https://devfeed.tech/articles/easy-thread-19292.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/easy-thread/>)

Author: Shai Almog

Published: 2017-05-08T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [future](<https://devfeed.tech/tags/future.md>), [java](<https://devfeed.tech/tags/java.md>), [programming](<https://devfeed.tech/tags/programming.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This tutorial presents an Easy Thread utility for Codename One that runs tasks on background threads, transfers results through callbacks, and dispatches callbacks asynchronously to the EDT. It also describes simplified synchronous variants and a method for stopping a thread and releasing its resources.

### Source excerpt

Working with threads is usually ranked as one of the least intuitive and painful tasks in programming. This is such an error prone task that some platforms/languages took the route of avoiding threads entirely. I needed to convert some code to work on a separate thread but I still wanted the ability to communicate and transfer data from that thread. This is possible in Java but non-trivial, the thing is that this is relatively easy to do in Codename One with tools such as callSerially I can let arbitrary code run on the EDT. Why not offer that to any random thread?

## Epoll's design limitations in multithreaded and load-balancing scenarios

DevFeed: [Epoll's design limitations in multithreaded and load-balancing scenarios](<https://devfeed.tech/articles/epoll-is-fundamentally-broken-1-2-38959.md>)

Original publisher: [Read original article](<https://idea.popcount.org/2017-02-20-epoll-is-fundamentally-broken-12>)

Author: Marek

Published: 2017-02-19T23:00:00Z

Content type: opinion

Language: en

Sources: [Marek Majkowski](<https://devfeed.tech/sources/marek-majkowski.md>)

Topics: [IO](<https://devfeed.tech/topics/io.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>)

Tags: [epoll](<https://devfeed.tech/tags/epoll.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [threading](<https://devfeed.tech/tags/threading.md>), [thundering-herd](<https://devfeed.tech/tags/thundering-herd.md>)

### AI overview

This article examines design limitations in Linux epoll, focusing on event delivery when file descriptors are shared across worker threads and on epoll's association with underlying kernel objects rather than file descriptors. It recommends defensive programming and avoiding several sharing, forking, and load-balancing patterns.

### Source excerpt

Epoll is fundamentally broken 1/2 I/O multiplexing part #3 In previous articles we talked about: This time we'll focus on Linux's successor - the I/O multiplexing syscall. Epoll is relatively young. It was created by Davide Libenzi in 2002. For comparison: Windows did IOCP in 1994 and FreeBSD's kqueue was introduced in July 2000. Unfortunately, even though epoll is the youngest in the advanced IO multiplexing family, it's the worse in the bunch.

## Become a Firebase Taskmaster! (Part 1: The Essentials)

DevFeed: [Become a Firebase Taskmaster! (Part 1: The Essentials)](<https://devfeed.tech/articles/become-a-firebase-taskmaster-part-1-the-essentials-16130.md>)

Original publisher: [Read original article](<https://firebase.blog/posts/2016/09/become-a-firebase-taskmaster-part-1>)

Author: Doug Stevenson

Published: 2016-09-13T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Firebase](<https://devfeed.tech/topics/firebase.md>), [Android](<https://devfeed.tech/topics/android.md>), [Framework](<https://devfeed.tech/topics/framework.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [blocking](<https://devfeed.tech/tags/blocking.md>), [firebase](<https://devfeed.tech/tags/firebase.md>), [java](<https://devfeed.tech/tags/java.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>), [performance](<https://devfeed.tech/tags/performance.md>), [threading](<https://devfeed.tech/tags/threading.md>), [tutorials](<https://devfeed.tech/tags/tutorials.md>)

### AI overview

Part 1 of a Firebase blog series explains the Play services Task API and how Firebase uses it to perform asynchronous work in Android apps without blocking the main thread. It also places Tasks alongside other Android threading techniques.

### Source excerpt

News, tutorials, and updates from the Firebase team.

## Google SoC lwIP Conclusion

DevFeed: [Google SoC lwIP Conclusion](<https://devfeed.tech/articles/google-soc-lwip-conclusion-32782.md>)

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

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

Content type: article

Language: en

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

Topics: [ReactOS](<https://devfeed.tech/topics/reactos.md>), [lwIP](<https://devfeed.tech/topics/lwip.md>), [TCP/IP](<https://devfeed.tech/topics/tcp-ip.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [conclusion](<https://devfeed.tech/tags/conclusion.md>), [free](<https://devfeed.tech/tags/free.md>), [google](<https://devfeed.tech/tags/google.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [lwip](<https://devfeed.tech/tags/lwip.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-ip](<https://devfeed.tech/tags/tcp-ip.md>), [threading](<https://devfeed.tech/tags/threading.md>), [udp](<https://devfeed.tech/tags/udp.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>)

### AI overview

A Google Summer of Code participant reports on developing TCP and UDP support for ReactOS using lwIP. The project did not achieve full browser support or a Windows Server 2003 driver replacement, but produced a fairly robust TCP/IP driver for C console applications using TCP and UDP sockets, with extensive testing on loopback.

### Source excerpt

My Google Summer of Code project proposal stated that I would add TCP support to the network branch of ReactOS, which sought to integrate lwIP 1.4.1 as the protocol level network driver for the operating system, to ultimately be tested by replacing the network driver in an installation of Windows Server 2003 with my driver. The full proposal can be found here. At the time of my proposal, I underestimated the amount of effort a fully working network driver would take.

## Upgrading a Reverse Proxy from Netty 3 to 4

DevFeed: [Upgrading a Reverse Proxy from Netty 3 to 4](<https://devfeed.tech/articles/upgrading-a-reverse-proxy-from-netty-3-to-4-15936.md>)

Original publisher: [Read original article](<https://developer.squareup.com/blog/upgrading-a-reverse-proxy-from-netty-3-to-4>)

Author: Square Engineering

Published: 2016-08-09T16:12:00Z

Content type: article

Language: en

Sources: [Square Corner Blog RSS Feed](<https://devfeed.tech/sources/square-corner-blog-rss-feed.md>)

Topics: [Netty](<https://devfeed.tech/topics/netty.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Java](<https://devfeed.tech/topics/java.md>), [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [gRPC](<https://devfeed.tech/topics/grpc.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>)

Tags: [engineering](<https://devfeed.tech/tags/engineering.md>), [http](<https://devfeed.tech/tags/http.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [java](<https://devfeed.tech/tags/java.md>), [memory](<https://devfeed.tech/tags/memory.md>), [microservice-architecture](<https://devfeed.tech/tags/microservice-architecture.md>), [migration](<https://devfeed.tech/tags/migration.md>), [performance](<https://devfeed.tech/tags/performance.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [threading](<https://devfeed.tech/tags/threading.md>), [upgrade](<https://devfeed.tech/tags/upgrade.md>)

### AI overview

Square describes upgrading Tracon, its reverse HTTP proxy powered by Netty, from Netty 3 to Netty 4. The article explains the motivation for the migration, including Netty 3 reaching end of life and the need to proxy HTTP/2 for mobile clients and gRPC infrastructure, and discusses issues encountered during the completed upgrade.

### Source excerpt

Tracon is our reverse HTTP proxy powered by Netty. We recently completed an upgrade to Netty 4 and wanted to share our experience.

## Python Thread Pool

DevFeed: [Python Thread Pool](<https://devfeed.tech/articles/python-thread-pool-31837.md>)

Original publisher: [Read original article](<https://www.metachris.dev/2016/04/python-threadpool/>)

Author: Chris Hager

Published: 2016-04-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Chris Hager](<https://devfeed.tech/sources/chris-hager.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [code](<https://devfeed.tech/tags/code.md>), [python](<https://devfeed.tech/tags/python.md>), [queue](<https://devfeed.tech/tags/queue.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [thread](<https://devfeed.tech/tags/thread.md>), [threading](<https://devfeed.tech/tags/threading.md>), [threads](<https://devfeed.tech/tags/threads.md>)

### AI overview

This tutorial explains Python thread pools, including how a fixed group of worker threads processes queued tasks concurrently. It discusses ThreadPoolExecutor and an interruptible thread queue implementation for Python 2.x and 3.x.

### Source excerpt

A thread pool is a group of pre-instantiated, idle threads which stand ready to be given work. These are often preferred over instantiating new threads for each task when there is a large number of (short) tasks to be done rather than a small number of long ones. Suppose you want do download 1000s of documents from the internet, but only have resources for downloading 50 at a time. The solution is to utilize is a thread pool, spawning a fixed number of threads to download all the URLs from a queue, 50 at a time.

[Next page](<https://devfeed.tech/tags/threading.md?cursor=WyIyMDE2LTA0LTExVDAwOjAwOjAwKzAwOjAwIiwgIjQwNGJkNjYwLTcxYmUtNGViNS04OWZkLWEyM2MzMWRhYWFlOSJd>)