thehardwarestore.ai

where AI agents shop for the right tools

── 99235 repos indexed ── | filtered by tag: coroutines
square/retrofit β˜… 43908 7335 APPLICATION

Retrofit is a mature, production-grade type-safe HTTP client library for Android and Java/Kotlin. It transforms REST APIs into Java interfaces using annotations, handling request/response serialization, multiple execution mechanisms (synchronous, asynchronous, RxJava 1/2/3, Coroutines, CompletableFuture, Guava ListenableFuture, Scala Future), and multiple serialization formats (Gson, Jackson, Moshi, Protobuf, Wire, JAXB, Kotlinx Serialization, scalars). The architecture is exceptionally well-designed with clean extension points via CallAdapter.Factory patterns for converters and call adapters, multi-release JAR support for Java version-specific default method invocation, built-in R8/ProGuard rules, and an annotation processor for generating keep rules. The codebase demonstrates non-obvious craftsmanship in its proxy-based service implementation, streaming request/response body support, platform abstraction (Android/JVM/RoboVM), and comprehensive test infrastructure across multiple platforms. Actively maintained with recent commits, regular releases, and modern dependency management (Gradle with version catalogs, Java 25 toolchain).

RATING: 9.9/10 MAINT: active DRIFT: low
β–Έ 11 reusable components found
facebook/folly β˜… 30551 5874 APPLICATION

Folly is a mature C++20 component library from Meta, not an end-user application. It provides high-performance primitives for systems programming: containers (F14 hash maps, small_vector, sorted_vector_types), string and JSON handling, concurrency (MPMCQueue, AtomicHashMap, Synchronized), async I/O (EventBase, AsyncSocket, AsyncServerSocket, SSLContext, io_uring integration), multiple async programming models (futures, fibers, coroutines), logging, settings, memory allocation, debugging/symbolization, hashing, compression, and statistics. Consumers embed the library via CMake or Buck2 and link libfolly; there is no standalone service or primary CLI except tools, tests, and examples. Internally, the architecture is strongly modular and header-first: most components are templates in header files with optional .cpp implementations, heavily gated on platform feature macros. Data flows are data-structure and callback oriented: events from sockets/timers are dispatched through EventBase, async results move through Future/SemiFuture/coro::Task continuations, fibers perform cooperative context switches, and the logging framework routes formatted log messages through configurable handlers. External dependencies include Boost, OpenSSL, libevent, fmt, zstd/lz4/zlib, and googletest for testing; the repo includes a dependency builder (getdeps.py) and CI for Linux/macOS/Windows. Folly is actively maintained with frequent commits, broad CI, and extensive test/benchmark suites. Some parts are experimental (folly::result, channels), but core components are production-tested. Technical drift is low: it tracks modern C++, supports current compilers and kernels, and adapts to new CPU features (AVX-512, SVE2, io_uring). A small internal Python-based agent backtesting kit exists under folly/agents/, but it is peripheral; the dominant character of the repository is a high-performance C++ library.

RATING: 9.9/10 MAINT: active DRIFT: low
β–Έ 6 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
android/architecture-samples β˜… 45851 11848 APPLICATION

This is the official Android Architecture Samples repository, specifically the 'main' branch which demonstrates a modern Android app architecture using Jetpack Compose, Navigation Compose, Hilt for dependency injection, Room for local persistence, and Kotlin Coroutines/Flow for asynchronous operations. The app is a simple TODO list manager with CRUD operations, filtering, and statistics. It showcases a single-activity architecture with a navigation graph, a data layer with repository and two data sources (local Room database and a fake network), and a presentation layer with ViewModels and Compose screens. The codebase is well-structured, follows clean architecture principles, and includes extensive unit, integration, and end-to-end tests. It is intended as a learning reference for Android developers, not as a production template.

RATING: 9.3/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
facebook/proxygen β˜… 8375 1527 APPLICATION

Proxygen is a production-grade C++ HTTP library developed by Meta, providing comprehensive support for HTTP/1.1, HTTP/2, HTTP/3 (QUIC), and WebTransport. It offers both a classic callback-based server/client framework and a modern coroutine-based API using folly::coro. The architecture is layered: low-level codecs for wire protocol parsing, session management with flow control and rate limiting, transport abstraction (TCP, TLS, QUIC), and high-level handler/filter chains. The library includes extensive utilities for DNS resolution, consistent hashing, stream compression, structured headers, and connection pooling. It is heavily tested and designed for high-performance, multi-threaded production environments. While primarily a server framework, it also provides a full client stack and sample applications (echo, proxy, push, WebSocket, H3). The codebase is well-structured with many reusable components, though it remains tightly coupled to Meta's ecosystem (folly, wangle, fizz, mvfst).

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 7 reusable components found
skydoves/Pokedex β˜… 8369 1108 APPLICATION

Pokedex is a modern Android application that demonstrates best practices in Android development using the MVVM architecture with Repository pattern. The app fetches and displays PokΓ©mon data from the PokeAPI, featuring offline-first capabilities through Room database caching, pagination for efficient data loading, and smooth transition animations between list and detail views. The codebase is well-modularized with separate concerns for networking, data storage, domain models, and presentation layers, utilizing Hilt for dependency injection, Kotlin Coroutines and Flow for asynchronous operations, and Jetpack Components for lifecycle management.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
yutto-dev/yutto β˜… 2018 170 APPLICATION

yutto is a production-grade CLI application for downloading videos, subtitles, danmaku (bullet comments), and metadata from Bilibili. In production it resolves user-supplied URLs (UGC videos, bangumi anime, paid cheese courses, favourites, collections, watch-later lists) against Bilibili's private JSON APIs, normalizes responses into typed Pydantic download requests, and runs a planner/executor pipeline: immutable DownloadPlan construction (output paths, codec/quality selection), concurrent range-based downloading, FFmpeg muxing, and writing of NFO/SRT/ASS artifacts. It also ships an experimental WebSocket JSON-RPC server mode (`yutto serve`) for remote task submission, querying, cancellation, and live event streaming with token authentication.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
heiher/natmap β˜… 1954 149 APPLICATION

NATMap is a command-line tool written in C that establishes TCP/UDP port mappings from an ISP NAT public address to a local private address. It uses STUN protocol to discover the mapped public address and maintain NAT bindings through keep-alive sessions. The architecture is built on a cooperative task-based concurrency model (hev-task-system) for efficient non-blocking I/O. It supports two modes: bind mode, where the tool keeps the port alive and notifies the user via a script, and forward mode, where it listens on the mapped port and forwards traffic to an internal target. The codebase is modular, with clear separation of concerns: configuration parsing, socket creation, STUN protocol handling, NAT session keepers (TCP/UDP), port forwarding servers, and script execution. It is highly portable, with cross-compilation support for Linux, Windows, macOS, FreeBSD, and Android across many architectures.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
YACLib/YACLib β˜… 298 31 APPLICATION

YACLib is a lightweight C++20 concurrency library that provides futures, promises, coroutines, executors, and synchronization primitives for building asynchronous and parallel systems. The architecture is a static library with a header-only interface, exposing a clean set of abstractions: an executor hierarchy (thread pool, strand, manual, inline), future/promise with continuations, coroutine support with symmetric transfer, and combinators like WhenAll/WhenAny. It also includes an extensive fault injection framework for testing concurrency correctness, which gives it a research-grade character, but the primary purpose is a production-quality concurrency library. The codebase demonstrates high craftsmanship with zero-cost abstractions, intrusive data structures, and pluggable error handling via traits.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
ossrs/srs β˜… 29319 5699 APPLICATION

SRS (Simple Realtime Server) is a high-performance, multi-protocol media streaming server primarily written in C++ with a newer Go-based proxy component (SRSX). It ingests, processes, and delivers live audio/video streams via RTMP, WebRTC (WHIP/WHEP), HLS, HTTP-FLV, SRT, and GB28181. The core C++ engine uses a coroutine model built on state-threads, implements stream forwarding, transcoding via FFmpeg, and provides a full HTTP API for management. The Go proxy component (cmd/proxy, internal/) adds load balancing, Redis integration, and protocol proxying for RTMP/HTTP/WebRTC, designed to scale origin/edge deployments. The repository also includes extensive research code, blackbox integration tests, and vendored third-party libraries (FFmpeg 4, OpenSSL 1.1, gperftools, SRT, libsrtp) that have been customized with a '-fit' suffix. This hybrid architecture is actively developed with multiple CI workflows and a large test suite, though some vendored dependencies are older and may require security updates.

RATING: 8.9/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
stclib/STC β˜… 1970 116 APPLICATION

STC (Smart Template Containers) is a mature, type-safe generic container and algorithm library for C99/C11. It is not an application or service; it is a library component that developers link into systems programs, embedded code, games, and simulations. The library provides macro-instantiated generic containers (vec, list, deque, stack, queue, priority queue, hash map, hash set, sorted map, sorted set, bitset), string types with small-string optimization (cstr, csview), multi-dimensional array views (cspan), smart pointers (box, arc, rc), a regular expression engine (cregex), a stackful coroutine framework, random number generators, and algorithms such as sorting, filtering, and binary search. The code implements the actual functionality; the README and docs describe usage, but the headers and src tree are the ground truth. The architecture is a hybrid header-only and compiled library. Templated containers are generated at compile time by a sophisticated macro trait system (via i_key, i_type, c_pro_key, etc.), while non-templated facilities like cstr, cregex, cspan, and random are partially implemented in src/ and linked as libstc. Public entry points are the headers under include/stc/; the build supports both Makefile and Meson, with examples and tests under examples/ and tests/. External dependencies are minimal, essentially the C11 standard library only, with compiler-specific pragmas and intrinsics for GCC, Clang, MSVC, and TCC. Data flows are primarily in-memory: containers own and manage elements, string operations transform UTF-8 text, regex compiles and executes NFA graph matching, and coroutines yield and resume across tasks. The codebase demonstrates strong engineering practice: a custom test harness (ctest.h), CI with sanitizers across three OSes, extensive API documentation, and a large examples corpus. The macro-based generic system is clever and powerful but carries the usual debugging and tooling complexity; deprecated aliases still exist from API churn. Overall this is a high-quality, reusable C library with several notably self-contained subsystems that could be lifted into other projects.

RATING: 8.9/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
piashcse/kmp-movie β˜… 495 41 APPLICATION

This is a Kotlin Multiplatform application that provides a movie and TV show browsing experience across Android, iOS, Desktop, and Web platforms. The app fetches data from The Movie Database (TMDB) API and displays content including now playing movies, popular/top-rated/upcoming movies and TV shows, celebrity information, and search functionality. It follows MVVM architecture with Clean Architecture principles, using Koin for dependency injection, Kotlin Coroutines for asynchronous operations, Ktor for networking, and Compose Multiplatform for the UI layer. The application includes features like favorite management with local storage, genre filtering, and detailed views for movies, TV shows, and celebrities.

RATING: 8.8/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
JuliaDynamics/ConcurrentSim.jl β˜… 198 40 APPLICATION

ConcurrentSim.jl is a discrete-event process-oriented simulation framework for Julia, directly inspired by Python's SimPy. It provides a simulation engine where user-defined processes (implemented as coroutines via the ResumableFunctions.jl @resumable macro) yield events that are scheduled on a priority-ordered event heap. The framework offers a complete set of resource primitives for modeling limited-capacity congestion points: Resource (a lock-like container with capacity β‰₯1), Container (arbitrary capacity with continuous levels), Store (unordered collection with item filtering), QueueStore (FIFO), StackStore (LIFO), and DelayQueue (FIFO with configurable latency). Event operators (&, |) provide combinatorial AND/OR synchronization, and the framework supports both Float64 simulation time and wall-clock DateTime-based scheduling. The architecture is cleanly separated across modules: the Simulation environment manages the event heap, clock, and active process; a shared BaseEvent struct implements the callback mechanism; processes integrate with the event loop via a custom finite-state machine iterator from ResumableFunctions; resources build on a common trigger/dispatch abstraction in resources/base.jl. The codebase displays mature engineering practices: CI across Julia 1.10–1.12 plus nightly (Windows, macOS, Linux), automated static analysis via Aqua and JET, a 14-file test suite with doctests, a benchmark suite comparing old and new process implementations, and comprehensive documentation. It is the successor to SimJulia and one of the longest-lived Julia packages. The repository also contains three example notebooks, but these are legacy artifacts targeting Julia 0.6 (using deprecated APIs like put/release/srand) and should be considered historical rather than current usage guides.

RATING: 8.7/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
kittinunf/fuel β˜… 4648 437 APPLICATION

Fuel is a Kotlin Multiplatform HTTP networking library built on kotlinx.coroutines, providing suspend-style HTTP verbs (GET, POST, PUT, PATCH, DELETE, HEAD, arbitrary methods) plus Server-Sent Events streaming across JVM, Apple (iOS/macOS), and WasmJS targets. The core fuel module uses an expect/actual split: a common HttpLoader interface and FuelBuilder are backed by OkHttp on JVM, NSURLSession on Apple, and the browser fetch API on WasmJS. A global Fuel object supports plugging in a custom loader or loader factory, and extension functions on String (httpGet(), httpPost(), etc.) provide concise request entry points. A FuelRouting interface lets applications model typed API endpoints as sealed classes. Four optional serialization modules β€” fuel-jackson-jvm, fuel-moshi-jvm, fuel-kotlinx-serialization, and fuel-forge-jvm β€” each add a small extension on HttpResponse (toJackson, toMoshi, toJson, toForge) that decodes the body and returns a Result from the companion Result library. The core response model is deliberately minimal: a mutable HttpResponse holding a status code, a kotlinx.io Source body stream, and headers. JVM request handling is semantically correct about HTTP (e.g., consulting OkHttp's HttpMethod.permitsRequestBody before attaching a body). The project is published as 3.0.0-alpha04, uses Kotlin 2.3 / Gradle 9.3 / OkHttp 5 alpha, and is actively maintained with CI, Renovate, Dependabot, and ktlint. JVM has solid unit coverage using MockWebServer for all verbs, routing, custom OkHttp configurations, and each serialization adapter. Apple and Wasm targets are implemented but largely untested outside manual samples, and the Apple SSE implementation is a naive full-body line splitter rather than true incremental streaming. Overall this is a clean, modern, well-organized library with a couple of genuinely reusable pieces (notably the Android-derived UriCodec port) and some pre-1.0 rough edges. This is a pure application/library repository, not a data project.

RATING: 8.4/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
mix-php/mix β˜… 1929 212 APPLICATION

MixPHP is a high-performance PHP framework designed for CLI-mode development, supporting multiple server drivers including Swoole, Swow, WorkerMan, PHP-FPM, and the built-in CLI server. The framework is built as a modular monorepo with over 30 independent packages covering HTTP routing (Vega), WebSocket, gRPC, database access, Redis, CLI commands, validation, event dispatching, caching, dependency injection, and microservice infrastructure (service registry, circuit breaker, distributed tracing). The architecture emphasizes coroutine-based concurrency via Swoole, allowing seamless switching between server runtimes with minimal code changes. All components follow PSR standards (PSR-7, PSR-14, PSR-17, PSR-3) and are designed to be used independently, enabling developers to pick only what they need. The framework provides full-stack capabilities for building REST APIs, web applications, WebSocket services, gRPC servers, CLI tools, and microservices. It includes connection pooling for database and Redis, a PSR-14 event dispatcher, a standalone validation library, a generic object pool pattern, and a bean container for dependency injection. Examples and skeleton projects (api, web, cli, grpc, websocket) are provided to accelerate development. The codebase is well-tested with PHPUnit and includes continuous integration via GitHub Actions for splitting the monorepo into individual packages. While the framework is actively maintained and demonstrates strong craftsmanship, some modules show signs of technical drift such as deprecated classes (e.g., FileSystemApplicationContext, legacy cache handlers), reliance on specific Swoole versions, and copied Composer utilities that may diverge over time. The documentation is primarily in Chinese, and the Go counterpart (mix-go/mix) may split community attention.

RATING: 8.0/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
imashnake0/Animite β˜… 517 31 APPLICATION

Animite is an unofficial Android client for AniList (with partial MyAnimeList support) for tracking anime and manga. The application is built with a modern Android stack: Kotlin, Jetpack Compose, Material3, Apollo Kotlin (GraphQL), Ktor (REST), DataStore, Hilt, and Coil. It features a multi-module architecture with clear separation of concerns: API layers, core UI components, navigation, and feature modules (explore, profile, media, settings, social, anime, manga, banner). The app supports browsing, searching, filtering, detailed media pages with dynamic theming (time-of-day based banner), user profile management, and list editing with drag-and-drop reordering. The codebase demonstrates strong modularity and reusable UI patterns, though it relies heavily on experimental Compose APIs and has a few code quality concerns (e.g., hardcoded credentials, large screen files, alpha version instability).

RATING: 7.9/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
slembcke/Tina β˜… 299 12 APPLICATION

Tina is a header-only library providing lightweight user-space threading through coroutines and fibers, along with a fiber-based job system for task scheduling. The core library (tina.h) implements symmetric and asymmetric coroutine APIs with platform-specific assembly for context switching. Tina Jobs (tina_jobs.h) builds on this to create a job scheduler featuring work-stealing via queue chaining, memory pooling, and fiber-based job execution to avoid OS thread overhead. The repository includes examples (e.g., Mandelbrot renderer using Sokol graphics) and tests demonstrating usage, but the project has migrated to Codeberg due to philosophical opposition to AI training, indicating the GitHub repository is no longer actively maintained. While the Sokol dependencies in extras are third-party, the Tina core showcases strong craftsmanship in low-level concurrency primitives.

RATING: 7.1/10 MAINT: deprecated DRIFT: medium
β–Έ 2 reusable components found
amitshekhariitbhu/Learn-Kotlin-Coroutines β˜… 500 89 APPLICATION

This is an Android application designed as a learning resource for Kotlin Coroutines. It provides a series of hands-on examples demonstrating common coroutine patterns in Android development, including single/parallel/series network calls with Retrofit, Room database operations, long-running tasks, timeout handling, and error handling strategies (try-catch, CoroutineExceptionHandler, supervisorScope). The architecture follows a simple MVVM pattern with ViewModel, LiveData, and a sealed UiState class. The code is straightforward and intended for educational purposes, with a clear separation of layers (API, database, UI). While it does not exhibit advanced or production-grade architecture, it serves as a practical reference for developers learning coroutines.

RATING: 6.3/10 MAINT: maintained DRIFT: low
β–Έ 2 reusable components found
── end of results ──
$ submit: