Marl is a high-performance, hybrid thread/fiber task scheduler library written in C++11. It provides a flexible and fluent API for scheduling asynchronous tasks across a configurable number of worker threads, while using fibers (cooperative lightweight threads) to allow tasks to block and yield without stalling hardware threads. The library includes a rich set of synchronization primitives (Event, WaitGroup, Ticket, ConditionVariable, mutex, and DAG for declarative task graphs). It emphasizes safe capture-by-value semantics for primitives to avoid dangling references. The implementation is platform-agnostic with hand-optimized assembly fiber context switching for x86/x64, ARM, RISC-V, LoongArch, MIPS64, and PowerPC64, plus Windows fibers and Emscripten support. The project includes extensive unit tests and benchmarks, a pluggable memory allocator interface, and a tracked allocator for debugging. It is designed as a library to be embedded into larger C++ applications that require fine-grained concurrency control. The codebase demonstrates strong engineering craftsmanship: clean separation of concerns, excellent use of C++ features, Thread Safety Analysis annotations, and thorough testing. Key reusable components include the custom containers (small-buffer optimized vector and efficient list), the pool abstraction (bounded and unbounded), and the flexible allocator framework.
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.
SortMeRNA is a bioinformatics application designed to filter ribosomal RNA (rRNA) sequences from metatranscriptomic or total RNA sequencing data. It employs a seed-and-extend alignment strategy using a burst trie index for efficient k-mer lookup and Smith-Waterman for alignment extension, coupled with statistical significance testing (E-value) to distinguish rRNA from non-rRNA reads. The tool processes input in parallel via a thread pool and supports both single-end and paired-end reads in FASTA/FASTQ format (including gzipped), producing aligned and non-aligned output files in multiple formats (FASTA, FASTQ, SAM, BLAST-like) along with optional OTU clustering and alignment reports. The application follows a modular architecture with distinct components for input handling (Readfeed), reference indexing (Index/IndexDB), parallel processing (Processor/ThreadPool), alignment computation, and output reporting (various Report* modules). Key features include a checkpoint/resume mechanism implemented using a RocksDB-based key-value store (KVDB) to enable recovery from interruptions, and a portable SIMD layer (SSE2NEON) that allows the same code to leverage vectorized instructions on both x86 and ARM architectures. The build system is managed by CMake with conda-based dependency handling, ensuring reproducibility across platforms. Despite its complexity due to the integration of multiple third-party libraries (zlib, RocksDB, BBHash, Parasail, ALP) and the need for careful version management, the project demonstrates active maintenance with recent commits and a structured release history. The codebase exhibits several well-crafted, reusable components such as the thread pool, KVDB wrapper, and SSE2NEON compatibility layer, which could be extracted for use in other projects with minimal modification. The tool is primarily used in microbiome and transcriptomics workflows for rRNA depletion, a critical preprocessing step in metatranscriptomic analysis.
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.
PowerThreadPool is a high-performance .NET thread pool library designed for managing both synchronous and asynchronous workloads with granular control. It implements a low-contention thread pool using work-stealing priority queues, lock-free synchronization primitives, and sophisticated state management for workers and work items. The library provides features like work dependency tracking, group-based operations, pause/resume/cancel controls, timeout/retry policies, and event-driven monitoring. Architecture centers around the PowerPool class managing Worker instances that execute work from concurrent collections, with async support via custom synchronization contexts. Entry points include QueueWorkItem overloads for submitting work and control methods like Start/Stop/Pause/Resume. The library targets .NET Framework 4.0+ through .NET 5+ and netstandard, demonstrating careful backward compatibility through conditional compilation.