Implementing Asynchronous Operations in OpenHarmony NAPI with Callbacks and Promises
This article builds upon the foundation of porting third-party libraries to OpenHarmony NAPI. We'll modify the hellonapi.cpp and index.ets files to explore asynchronous operations using Promises and Callbacks within the NAPI framework. This guide includes three examples: a Callback-based asynchronous interface, a Promise-based asynchronous inte ...
Posted on Sun, 20 Sep 2026 16:19:52 +0000 by scliburn
Mastering JavaScript Promises: States, Methods, and Practical Patterns
Core Concepts and State Transitions
A Promise serves as a placeholder for the eventual result of an asynchronous operation. It operates through a strict lifecycle governed by three states:
pending: The initial phase where the operation is still in progress.
fulfilled: The operation completed successfully, yielding a value.
rejected: The operat ...
Posted on Sun, 13 Sep 2026 16:30:28 +0000 by cbailster
Leveraging the Task Parallel Library for Asynchronous Work in .NET
The Task Parallel Library (TPL), introduced in .NET 4.0 and refined in 4.5, provides a higher-level abstraction over the thread pool. It shifts focus from raw threads to tasks—units of asynchronous work that may or may not execute on separate threads. A primary strength is its rich set of combinators that simplify chaining and error handling. E ...
Posted on Wed, 09 Sep 2026 16:56:20 +0000 by timvw
Implementing Non-Blocking and Modal Wait Indicators in WinForms
When developing applications with user interfaces (UIs) that perform background operations, managing the interaction between the UI thread and worker threads is crucial. Common scenarios involve controlling background tasks (start, pause, stop) and displaying their progress on the UI. A typical issue arises when lengthy operations, like databas ...
Posted on Fri, 04 Sep 2026 16:02:08 +0000 by tecktalkcm0391
AJAX Implementation Guide
AJAX (Asynchronous JavaScript and XML) represents a methodology for building interactive web applications using existing web standards. It enables data exchange with servers and partial page updates without requiring full page reloads. No browser plugins are necessary, though JavaScript execution must be enabled.
Advantages and Limitations
Bene ...
Posted on Thu, 06 Aug 2026 16:50:06 +0000 by mikeweb
Implementing Asynchronous Microservices Using the Vert.x Event Bus
The Vert.x framework facilitates high-performance asynchronous programming. When a request arrives, it is delegated to the event loop rather than blocking threads. The server dispatches the task and continues processing immediately. Once the background operation completes, the result is returned via a callback mechanism, notifying the client. T ...
Posted on Tue, 28 Jul 2026 16:39:22 +0000 by Tchelo
Asynchronous Functions in ECMAScript
async functions in JavaScript provide a more intuitive approach to asynchronous programming. Built on Promises, they enable writing asynchronous code in a synchronous style.
Core Concepts of Async Functions
An async function is a specialized function type, essentially syntactic sugar for asynchronous operations. Introduced in the ECMAScript 201 ...
Posted on Mon, 27 Jul 2026 17:10:31 +0000 by Edward
Mastering CompletableFuture: From Daemon Threads to Advanced Usage
The Daemon Thread Traps in CompletableFuture
When using CompletableFuture, developers often encounter a situation where the program terminates before the asynchronous task completes. Consider this example:
public class MainTest {
public static void main(String[] args) throws Exception {
CompletableFuture.supplyAsync(() -> {
...
Posted on Sat, 25 Jul 2026 16:59:37 +0000 by as22607
Composing Suspending Functions with Kotlin Coroutines
Sequential Invocation
Consider defining two distinct suspending functions that perform operations like remote service calls or computations. The functions themselves are presumed to be useful, but for this example, they simply delay for one second before returning a result:
suspend fun fetchFirstValue(): Int {
delay(1000L) // Simulates a us ...
Posted on Thu, 23 Jul 2026 16:18:24 +0000 by CFennell
Optimizing Network Requests with AIOHTTP: Asynchronous HTTP for Python Applications
Optimizing Network Requests with AIOHTTP: Asynchronous HTTP for Python Applications
AIOHTTP is a powerful asynchronous HTTP client/server library for Python that significantly improves network request efficiency compared to traditional synchronous approaches. This guide demonstrates how to implement asynchronous image downloads and optimize Py ...
Posted on Thu, 16 Jul 2026 17:08:00 +0000 by Magestic