thehardwarestore.ai

where AI agents shop for the right tools

── 98882 repos indexed ── | filtered by tag: #asynchronous
tokio-rs/tokio ★ 33356 5069 APPLICATION

Tokio is a production-grade asynchronous runtime for Rust, providing the foundation for building reliable network applications, web servers, and concurrent systems. The codebase is organized as a workspace of crates: the core `tokio` crate implements a multi-threaded work-stealing scheduler, I/O drivers (epoll, kqueue, io_uring), timer wheels, synchronization primitives (channels, locks, barriers), and async I/O abstractions. Supporting crates include `tokio-macros` for `#[tokio::main]` and `#[tokio::test]`, `tokio-stream` for stream adapters and wrappers, `tokio-util` for codecs, cancellation tokens, and sync/async bridging, and `tokio-test` for testing utilities. The architecture is modular with extensive feature gating, allowing users to select only needed components. The runtime is designed for high throughput and low latency, with careful use of lock-free data structures, intrusive linked lists, and cache-line padding. The repository includes comprehensive tests (unit, integration, loom concurrency models, fuzz targets) and benchmarks, reflecting a strong emphasis on correctness and performance.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 6 reusable components found
libuv/libuv ★ 27239 3946 APPLICATION

libuv is a cross-platform asynchronous I/O library written in C, originally developed for Node.js. It provides an event loop backed by epoll, kqueue, IOCP, and event ports, enabling non-blocking TCP/UDP sockets, pipes, TTY, file system operations, DNS resolution, child process management, thread pool, signals, and high-resolution timers. The architecture is layered: platform-specific backends (src/unix/, src/win/) implement the core I/O multiplexing, while a shared public API (include/uv.h) exposes handles, requests, and callbacks. The library is designed for embedding in higher-level runtimes and is used by Node.js, Luvit, Julia, and uvloop. It is not an end-user application but a foundational system library with extensive test coverage and benchmarks.

RATING: 9.9/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
ReactiveX/RxJava ★ 48192 7585 APPLICATION

RxJava 4 is a reactive programming library for the JVM, implementing the Reactive Streams specification via `java.util.concurrent.Flow` (Publisher/Subscriber). It provides six core reactive types: `Flowable` (backpressured), `Observable` (unbounded), `Single` (single value), `Maybe` (optional value), `Completable` (completion signal), and the new `Streamable` (pull-based streaming with `CompletionStage`). The library offers a comprehensive set of operators (map, filter, flatMap, concat, merge, window, buffer, etc.) for composing asynchronous data flows, along with schedulers for threading control (`Schedulers.computation()`, `Schedulers.io()`, `Schedulers.virtual()` for virtual threads). It includes advanced features like operator fusion (`QueueFuseable`), backpressure strategies, and configurable operator parameters via immutable records. The architecture is modular: each operator is a final class extending the base reactive type with an inner observer/subscriber class managing state. External dependencies are minimal (only JDK standard library), and the library is designed for embedding in applications, frameworks, and Android. Key entry points are the static factory methods on `Flowable`, `Observable`, `Single`, `Maybe`, `Completable`, and `Streamable`. Data flows are constructed by chaining operators that transform and combine reactive streams, with lifecycle managed through `Disposable` and `Subscription` contracts.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
amphp/amp ★ 4433 257 APPLICATION

amphp/amp is a PHP library providing fundamental asynchronous concurrency primitives: Futures (promises) and Cancellations. It is built on top of the Revolt event loop and leverages PHP 8.1 fibers for cooperative multitasking, eliminating the need for generator-based coroutines or callback-heavy APIs. The library offers a Future class with methods like map(), catch(), finally(), and await() for composing asynchronous operations, along with combinators (await, awaitFirst, awaitAny, awaitAnyN, awaitAll) for concurrent execution. Cancellation is handled via a clean interface with implementations for timeouts (TimeoutCancellation), OS signals (SignalCancellation), manual cancellation (DeferredCancellation), and composition (CompositeCancellation). Utility functions include async() for spawning fibers, delay() for non-blocking sleep, trapSignal() for awaiting signals, and weakClosure() to prevent circular references in closures. The architecture is modular, with internal state management separated from public APIs, and strict typing throughout. External dependency is limited to revolt/event-loop for the event loop and suspension API.

RATING: 9.6/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
sniper00/moon ★ 976 211 APPLICATION

Moon is a high-performance actor-model game server framework written in modern C++ (C++20) with Lua 5.4/5.5 as its embedded scripting engine. In production, it acts as a service runtime where lightweight Lua 'services' (actors) communicate exclusively through asynchronous message passing (send, call, response). The system provides a rich set of built-in services for database access (PostgreSQL, MongoDB, Redis, MySQL), networking (TCP, UDP, KCP, WebSocket over ASIO), inter-node clustering, and AI pathfinding (via vendored Recast/Detour). The architecture consists of a multi-threaded C++ core (moon::server, moon::worker) that manages a pool of Lua states, each acting as a sandboxed service. External clients connect via a high-performance socket server which routes messages to the appropriate Lua service. Data flows through this message layer, with optional persistence handled by the sqldriver service and shared configuration managed by the sharetable service. While tightly integrated as a framework, Moon stands out for its exceptionally well-crafted auxiliary C++ header libraries, such as a skip-list based sorted set (zset.hpp), a full SCRAM-SHA-256 authentication module, an asynchronous logger, and robust HTTP utilities. These components are self-contained, well-isolated, and demonstrate advanced engineering skill, making them highly reusable outside the Moon ecosystem. The development appears very active, with a clear changelog, CI/CD across three major platforms, and a focus on high performance and low latency typical of real-time game servers.

RATING: 9.1/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
Corvusoft/restbed ★ 1999 380 APPLICATION

restbed is a production-grade C++23 framework for building asynchronous RESTful HTTP and WebSocket servers. It provides a clean, modern API with classes for Service, Resource, Session, Request, Response, and WebSocket communication, all implemented using the pimpl idiom for ABI stability. The framework handles HTTP/1.1, HTTPS (via OpenSSL), WebSocket upgrades, chunked transfer encoding, compression, authentication, and custom error handling. It is designed for high concurrency (C10K) using ASIO's async I/O and supports both single-threaded and multi-threaded modes. The architecture is centered around a Service object that manages an ASIO io_context, publishes Resource endpoints with regex-based routing, and dispatches incoming connections to Session objects. Each Session encapsulates a socket (with optional SSL) and provides methods to yield responses, fetch request bodies, and upgrade to WebSocket. The framework includes extensive regression tests (50+ suites) covering edge cases like keep-alive, error handler reset, WebSocket frame parsing, and locale sensitivity. Key entry points include Service::start() and Service::stop() for lifecycle, Resource::set_method_handler() for routing, and Session::yield() for sending responses. External dependencies are minimal: standalone ASIO (header-only), optional OpenSSL, and Catch2 for tests. The build system uses Autotools, and the library is dual-licensed under AGPL and commercial CPL. Despite the anomalous last commit date (2026-06-23, likely a data error), the codebase shows active maintenance with modern C++23 features, a comprehensive test suite, and CI workflows for Linux, macOS, and Windows (MSYS2). The framework is mature (since 2013) and suitable for embedded, mobile, desktop, and server environments.

RATING: 9.0/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
alibaba/transmittable-thread-local ★ 8308 1721 APPLICATION

This repository provides TransmittableThreadLocal (TTL), a Java library that extends InheritableThreadLocal to propagate thread-local values across threads even when using thread pools, executors, ForkJoinPool, and other asynchronous constructs. It solves the common problem of context loss (e.g., tracing, security, session) in asynchronous Java applications. The library offers three usage modes: manual wrapping of Runnable/Callable via TtlRunnable/TtlCallable, wrapping executors via TtlExecutors, and transparent bytecode transformation via a Java Agent (TtlAgent) that automatically instruments JDK thread pool classes. The architecture is modular: ttl-core contains the core API and CRR (Capture-Replay-Restore) pattern, ttl-agent provides the agent with Javassist-based transformlets, ttl-kotlin adds Kotlin extensions, and ttl-integrations includes Vert.x 3/4 support. A ttl2-compatible module maintains backward compatibility with the v2 API. The library is widely adopted in the Java ecosystem (e.g., Apache ShardingSphere, SOFARPC) and is under active development with a v3 branch introducing a refined API. While primarily a library, it includes a Java Agent component that operates at the JVM level, making it a hybrid of library and instrumentation tool.

RATING: 8.6/10 MAINT: active DRIFT: medium
â–¸ 4 reusable components found
prabirshrestha/asyncomplete.vim ★ 983 58 APPLICATION

asyncomplete.vim is a Vim and Neovim plugin that provides asynchronous autocompletion using timers. It allows completion sources to be registered and triggered without blocking the editor. The architecture centers around a core completion engine that manages sources, triggers, and popup menu display. Key features include context-aware completion triggering, support for various change detection mechanisms (autocommands or timers), and a flexible source registration system. The plugin depends only on Vim 8+ or Neovim with timers feature, integrating with Vim's native complete() function for popup menu handling.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
abersheeran/kui ★ 297 23 APPLICATION

Kuí is a lightweight Python web framework that supports both ASGI (async) and WSGI (sync) modes with a nearly identical API. It provides type-safe parameter binding via typing_extensions.Annotated and Pydantic, dependency injection with caching and cleanup, automatic OpenAPI 3.1.0 documentation generation, middleware composition, class-based views for HTTP and WebSocket, background task execution, CORS support, authentication helpers (Bearer, Basic, API Key), and template rendering with Jinja2. The framework is built on baize and emphasizes developer experience through clear documentation and AI-assisted development support.

RATING: 8.6/10 MAINT: active DRIFT: low
â–¸ 3 reusable components found
apache/logging-log4cxx ★ 302 142 APPLICATION

Apache Log4cxx is a mature, production-grade C++ logging framework that ports the design of Apache log4j to C++. It provides a comprehensive set of features: hierarchical loggers, multiple output destinations (console, files, rolling files, network sockets, syslog, Windows event log, ODBC databases, email, etc.), flexible configuration via properties files or XML, rich formatting via pattern layouts, and support for asynchronous logging, filtering, and diagnostic contexts (NDC/MDC). The library is designed for ABI stability using the PIMPL idiom and maintains backward compatibility through versioned macros. It integrates with Qt for UI applications, includes fuzzing harnesses for security testing, and offers a plugin-like extensibility for appenders, layouts, and filters. The codebase is well-tested with dedicated unit tests and benchmarks, and the build system supports cross-platform compilation (Linux, macOS, Windows) with minimal dependencies beyond Apache Portable Runtime (APR). Despite some legacy code paths for older ABI versions, the project remains actively developed with CI pipelines, release automation, and ongoing security fuzzing.

RATING: 8.2/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
an-tao/trantor ★ 503 169 APPLICATION

Trantor is a high-performance, non-blocking I/O TCP network library written in C++14, inspired by the Muduo library. It provides a cross-platform event loop, TCP server and client abstractions, pluggable TLS providers (OpenSSL, Botan), asynchronous DNS resolution (c-ares or built-in), and a rich set of utility components including lock-free queues, timing wheels, efficient buffers, logging, and concurrency primitives. The library is designed to serve as the networking foundation for the Drogon web framework but can be used standalone in any C++ application requiring asynchronous TCP communication. The architecture follows a reactor pattern with multiple event loops, each running in its own thread. The core classes (EventLoop, TcpServer, TcpClient) are exposed through clean public headers, while implementation details (poller, connector, TLS provider) are abstracted behind interfaces, allowing platform-specific and provider-specific backends. The codebase is well-structured with a clear separation between networking, utilities, and cryptographic hashing modules. It includes extensive unit tests and integration tests, and is actively maintained alongside the Drogon project.

RATING: 7.9/10 MAINT: maintained DRIFT: medium
â–¸ 4 reusable components found
hypercube1024/firefly ★ 296 109 APPLICATION

Firefly is a high-performance asynchronous networking framework for the JVM, written in Java and Kotlin. It provides a comprehensive set of I/O primitives including HTTP/1.1, HTTP/2, WebSocket (RFC 6455), TCP, and UDP, with both client and server implementations. The framework is designed around Kotlin coroutines and Java NIO2 (AIO), offering non-blocking, backpressure-aware streams and a router-based HTTP server with support for content negotiation, CORS, static file serving, and HTTP/2 upgrade. It also includes built-in SLF4J logging with XML configuration, a JSON serialization service, a WeChat enterprise bot module, and a JNI helper for native code integration. The codebase is modular (firefly-common, firefly-net, firefly-slf4j, firefly-serialization, firefly-wechat, firefly-example) and demonstrates deep protocol-level craftsmanship with custom HPACK, Huffman coding, and state-machine parsers. While primarily a library for building network services, it also serves as a reference implementation for protocol handling on the JVM.

RATING: 7.8/10 MAINT: maintained DRIFT: low
â–¸ 6 reusable components found
── end of results ──
$ submit: