marl is a lightweight C++ job system that schedules tasks on a pool of worker threads and runs them using cooperative fibers for high throughput. By decoupling “tasks” from OS threads, it minimizes context switches and lets workloads with fine-grained synchronization scale efficiently. The API is intentionally small—post tasks, wait on fences, and express dependencies—so you can retrofit it into existing engines without adopting a heavyweight framework. Under the hood, fibers allow tasks to yield while waiting, keeping cores busy without blocking threads. The runtime is portable across platforms and integrates cleanly with real-time systems that must minimize latency jitter. Graphics, simulation, and media pipelines use marl to turn long serial phases into parallel stages without rewriting everything around coroutines.
Features
- Fiber-backed task scheduler over a fixed worker thread pool
- Cooperative yielding to avoid blocking and keep cores busy
- Simple task, dependency, and fence APIs for incremental adoption
- Low overhead suitable for real-time and interactive workloads
- Cross-platform C++ library with minimal dependencies
- Plays well with existing engines, allocators, and profilers