awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
hnes avatar

hnes/libaco

0
View on GitHub↗
3,688 stars·404 forks·C·Apache-2.0·15 viewslibaco.org↗

Libaco

libaco is a low-level C library for cooperative multitasking that provides a runtime for managing asymmetric coroutines. It functions as an execution context manager and stack memory allocator, allowing a single process to initialize independent execution units with private stacks and perform manual context switching via yield operations.

The library distinguishes itself through its memory management and stability features, utilizing read-only guard pages at stack boundaries to trigger hardware faults upon stack overflow. It supports both private stack allocation and shared stack pooling to reduce memory overhead, and it provides configurable floating-point state isolation to maintain numerical precision during switches.

The system covers the full lifecycle of cooperative routines, including creation, state switching, and destruction. It includes error handling mechanisms that execute designated protector functions or callbacks when a routine terminates abnormally to ensure system stability and resource cleanup.

Features

  • Cooperative Multitasking - Provides a runtime for cooperative multitasking where routines voluntarily yield control to a scheduler.
  • C Context Switching Libraries - Provides low-level C primitives for rapid switching between execution states and private memory stacks.
  • Execution Context Management - Initializes independent execution units with private stacks and configurable memory regions.
  • Fine-Grained Task Switching - Implements low-level mechanisms for rapidly switching execution contexts between cooperative routines.
  • Context Switching Implementations - Implements the low-level mechanism of swapping CPU execution states between different cooperative tasks.
  • Stack Memory Management - Manages continuous memory regions for execution stacks, utilizing guard pages for overflow prevention.
  • Stack Overflow Protections - Utilizes read-only guard pages at stack boundaries to trigger hardware faults upon stack overflow.
  • Coroutine Lifecycle Management - Manages the full execution cycle of cooperative routines, from initialization to memory reclamation upon destruction.
  • Coroutine Libraries - Provides a low-level C runtime for managing asymmetric coroutines and cooperative multitasking.
  • Coroutines - Provides lightweight cooperative multitasking units that can be paused and resumed.
  • Asymmetric - Implements a control flow where a main coordinator manages the execution and suspension of several worker routines.
  • Coroutine Spawning - Initializes new cooperative execution units with specific entry functions and private stacks.
  • Floating Point State Management - Provides mechanisms for saving and restoring floating point control words to maintain numerical precision during switches.
  • Shared Stack Pools - Supports shared stack pooling to reduce memory overhead across multiple execution units.
  • Embedded Task Schedulers - Creates lightweight execution units suitable for resource-constrained environments requiring efficient task switching.
  • Stack-Copying Context Switches - Manages unit transitions by saving and restoring CPU registers during coroutine context switches.
  • Shared Stack Pooling - Supports shared stack pooling to reduce total system memory overhead while maintaining overflow protection.
  • Abnormal Termination Protectors - Executes a custom protector function when a routine terminates abnormally to ensure resource cleanup.
  • Routine Protector Functions - Executes designated protector functions or callbacks when a routine terminates abnormally to ensure system stability.
  • Windows Environments - Listed in the “Windows Environments” section of the Awesome C awesome list.

Star history

Star history chart for hnes/libacoStar history chart for hnes/libaco

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does hnes/libaco do?

libaco is a low-level C library for cooperative multitasking that provides a runtime for managing asymmetric coroutines. It functions as an execution context manager and stack memory allocator, allowing a single process to initialize independent execution units with private stacks and perform manual context switching via yield operations.

What are the main features of hnes/libaco?

The main features of hnes/libaco are: Cooperative Multitasking, C Context Switching Libraries, Execution Context Management, Fine-Grained Task Switching, Context Switching Implementations, Stack Memory Management, Stack Overflow Protections, Coroutine Lifecycle Management.

What are some open-source alternatives to hnes/libaco?

Open-source alternatives to hnes/libaco include: tencent/libco — libco is a C++ coroutine library and user-space task orchestrator designed for cooperative multitasking and… gevent/gevent — Gevent is a Python coroutine concurrency library and asynchronous task manager designed for high-concurrency I/O… boostorg/boost — Boost is a collection of portable, high-performance source libraries that extend the C++ standard library. It provides… waruqi/tbox — tbox is a multi-platform C standard library and toolkit designed for portable software development. It provides a core… js-csp/js-csp — Js-csp is a concurrency library that implements communicating sequential processes with channels and generator-based… lewissbaker/cppcoro — cppcoro is a C++ coroutine library and concurrency toolkit providing primitives for asynchronous tasks, lazy…

Open-source alternatives to Libaco

Similar open-source projects, ranked by how many features they share with Libaco.
  • tencent/libcoTencent avatar

    Tencent/libco

    8,684View on GitHub↗

    libco is a C++ coroutine library and user-space task orchestrator designed for cooperative multitasking and high-concurrency execution. It functions as a high-concurrency network framework and a synchronous-to-asynchronous wrapper that allows blocking system calls and socket functions to run asynchronously without modifying existing business logic. The project utilizes a specialized stack-copying context switching model to support millions of simultaneous TCP connections on a single machine. It includes a high-performance time wheel scheduler for managing asynchronous background jobs and dela

    C++
    View on GitHub↗8,684
  • gevent/geventgevent avatar

    gevent/gevent

    6,440View on GitHub↗

    Gevent is a Python coroutine concurrency library and asynchronous task manager designed for high-concurrency I/O tasks. It provides a cooperative networking framework for building asynchronous TCP, UDP, and HTTP servers, as well as a WSGI web server implementation for hosting web applications. The project is distinguished by its standard library monkey-patching tool, which replaces blocking synchronous functions with cooperative versions to enable asynchronous behavior in third-party code. This allows for a cooperative multitasking workflow where the system yields execution during I/O waits t

    Pythonasynciocoroutinesgreenlet
    View on GitHub↗6,440
  • boostorg/boostboostorg avatar

    boostorg/boost

    8,493View on GitHub↗

    Boost is a collection of portable, high-performance source libraries that extend the C++ standard library. It provides a wide range of reusable components, data structures, and algorithms designed to add capabilities to the base language across different platforms. The project is distinguished by its extensive focus on compile-time template metaprogramming and generic programming. It implements advanced architectural patterns such as policy-based design, concept-based type validation, and the use of SFINAE for conditional template resolution to minimize runtime overhead. The library covers a

    HTML
    View on GitHub↗8,493
  • waruqi/tboxwaruqi avatar

    waruqi/tbox

    5,111View on GitHub↗

    tbox is a multi-platform C standard library and toolkit designed for portable software development. It provides a core foundation for low-level system programming through a collection of system primitives, data structures, and memory management tools. The project includes a coroutine framework for cooperative multitasking and asynchronous logic, a data structure library featuring generic containers with a consistent iterator interface, and a memory management toolkit for pool allocation and debugging of heap overflows and leaks. It also provides a network and serialization toolset for handlin

    C
    View on GitHub↗5,111
  • See all 30 alternatives to Libaco→