Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. marl

marl

Apache-2.0C++

A hybrid thread/fiber task scheduler for C++11 that enables efficient execution of blocking tasks.

GitHubGitHub
2.0k stars201 forks0 contributors

What is marl?

Marl is a hybrid thread and fiber task scheduler written in C++11 that enables efficient execution of tasks across multiple threads. It solves the problem of blocking tasks by using fibers to yield execution, allowing other tasks to run while waiting, thus maximizing hardware thread utilization.

Target Audience

C++ developers building high-performance applications that require efficient task scheduling, such as game engines, servers, or real-time systems needing to handle blocking operations without wasting threads.

Value Proposition

Developers choose Marl for its hybrid approach that combines threads and fibers, providing efficient blocking task handling with a simple API, cross-platform support, and no external dependencies, making it a lightweight yet powerful concurrency solution.

Overview

A hybrid thread / fiber task scheduler written in C++ 11

Use Cases

Best For

  • Implementing efficient task-based parallelism in C++ applications
  • Handling blocking I/O operations without wasting thread resources
  • Building cross-platform concurrent systems with consistent behavior
  • Optimizing thread utilization in game engines or real-time systems
  • Simplifying concurrency patterns with a fluent scheduling API
  • Managing worker pools with built-in synchronization primitives

Not Ideal For

  • Real-time systems requiring deterministic task scheduling and strict timing guarantees
  • Projects heavily reliant on standard C++ threading primitives like std::thread without willingness to refactor
  • Small applications with minimal concurrency needs where setup overhead outweighs benefits
  • Environments where frequent external blocking calls cannot be easily avoided or wrapped

Pros & Cons

Pros

Hybrid Scheduling Efficiency

Combines threads and fibers to yield on blocking tasks, preventing thread wastage and maximizing hardware utilization as highlighted in the key features.

Cross-Platform Support

Runs on multiple OSes including Windows, macOS, Linux, and mobile platforms across various architectures, as listed in the README's supported systems.

No External Dependencies

Self-contained library with no required external dependencies for core functionality, simplifying integration, though unit tests need googletest.

Fluent API Design

Provides an intuitive interface with marl::schedule() and defer() for minimal boilerplate, demonstrated in the example code for task management.

Cons

Binding Management Complexity

Requires precise binding and unbinding of the scheduler to threads to avoid undefined behavior or destructor blocking, as warned in usage recommendations.

External Blocking Call Risks

Cannot safely use standard blocking functions like std::mutex::lock in tasks without risking deadlocks, necessitating workarounds like marl::blocking_call.

Restrictive Scheduler Policy

Recommends a single scheduler instance per process lifetime, which can be limiting for modular or dynamic application architectures.

Frequently Asked Questions

Quick Stats

Stars1,991
Forks201
Contributors0
Open Issues10
Last commit1 year ago
CreatedSince 2019

Tags

#parallel-computing#task-scheduler#coroutine#multithreading#threads#fibers#tasks#cplusplus#cross-platform#concurrency#scheduler#task-runner#thread-pool#performance#synchronization

Built With

C
C++11
G
GoogleTest
C
CMake

Included in

C/C++70.6k
Auto-fetched 1 day ago

Related Projects

concurrentqueueconcurrentqueue

A fast multi-producer, multi-consumer lock-free concurrent queue for C++11

Stars12,226
Forks1,915
Last commit20 days ago
TaskflowTaskflow

A General-purpose Task-parallel Programming System in C++

Stars11,937
Forks1,394
Last commit2 days ago
ThreadPoolThreadPool

A simple C++11 Thread Pool implementation

Stars8,731
Forks2,352
Last commit1 year ago
ArrayFireArrayFire

ArrayFire: a general purpose GPU library.

Stars4,882
Forks548
Last commit1 month ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub