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
Tencent avatar

Tencent/libco

0
View on GitHub↗
8,684 stars·2,120 forks·C++·27 views

Libco

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 delayed operations with constant-time complexity.

The library provides capabilities for fine-grained task switching and concurrent state management, using private variables and signals for communication between coroutines. It integrates non-blocking I/O and system-call interception to manage the lifecycle of lightweight threads without relying on kernel-level preemption.

Features

  • Cooperative Schedulers - Implements a cooperative scheduler where tasks voluntarily yield control to manage high-concurrency execution flow.
  • User-Space Concurrency - Orchestrates the creation, resumption, and yielding of concurrent tasks in user-space to avoid blocking the main thread.
  • High-Concurrency Networking - Handles millions of simultaneous TCP connections on a single machine using lightweight coroutines.
  • Stack-Copying Context Switches - Saves and restores CPU registers and memory segments by copying the coroutine stack to enable high-density concurrency.
  • Synchronous-to-Asynchronous Wrappers - Provides a mechanism to intercept system calls and socket functions, allowing synchronous business logic to execute asynchronously.
  • System-Call Interception - Wraps blocking I/O and socket functions to yield execution back to the scheduler until resources become available.
  • Concurrent Thread Execution - Enables pausing and resuming multiple functions to handle high volumes of concurrent processing.
  • Coroutine Libraries - Provides a C++ library for managing cooperative multitasking and high-concurrency execution through lightweight user-space threads.
  • Coroutines - Provides a minimal interface for creating, resuming, and yielding execution between coroutines for fine-grained task switching.
  • Non-blocking I/O - Integrates non-blocking I/O to handle millions of concurrent network connections without blocking the main execution thread.
  • Time Wheel Schedulers - Provides a high-performance time wheel mechanism for executing asynchronous background jobs and delayed operations.
  • Time Wheel Schedulers - Uses a circular buffer to track and trigger timed events with constant-time complexity for high-performance task management.
  • Coroutine Channels - Implements a system for sharing private variables and signals to coordinate state and communication between coroutines.
  • Fine-Grained Task Switching - Controls the execution lifecycle of coroutines to switch between functions without blocking the main thread.
  • High-Performance Task Schedulers - Manages background jobs and timed operations using a high-performance time wheel to minimize overhead.
  • Concurrent State Coordination - Coordinates communication and shared state between concurrent tasks using signals and private variables.
  • Coroutine Private Variables - Allocates dedicated memory regions for each coroutine to maintain local state and variables across execution suspensions.
  • Asynchronous Event Loops - Coroutine-based library for high-concurrency I/O.

Star history

Star history chart for tencent/libcoStar history chart for tencent/libco

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. 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

Projects sharing features with Libco

These projects share indexed features with Libco. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • hnes/libacohnes avatar

    hnes/libaco

    3,688View on GitHub↗

    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 r

    Cccoroutinecoroutine-library
    View on GitHub↗3,688
  • 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
  • python-trio/triopython-trio avatar

    python-trio/trio

    7,280View on GitHub↗

    Trio is an asynchronous I/O runtime and concurrency library for Python. It provides a system for executing non-blocking network and disk operations through a centralized event loop and task scheduler. The library is built on a structured concurrency model, which ensures that asynchronous tasks are bound to a specific lifetime and cannot outlive the scope that started them. It utilizes a nursery-based task manager to track task lifecycles in a parent-child tree, preventing orphaned concurrent operations by requiring child tasks to be joined before their parent scope exits. The framework cover

    Pythonasyncasync-awaitio
    View on GitHub↗7,280
  • eclipse-vertx/vert.xeclipse-vertx avatar

    eclipse-vertx/vert.x

    14,667View on GitHub↗

    Vert.x is a reactive polyglot framework and asynchronous programming library for the Java Virtual Machine. It functions as an event-driven networking framework and toolkit for building non-blocking applications. The system enables the development of high-concurrency network services and event-driven microservices. It supports the creation of reactive services using multiple languages running on the JVM. The framework covers a wide range of capabilities including the management of HTTP and TCP network protocols, non-blocking file system access, and the integration of reactive clients.

    Javaconcurrencyevent-loophigh-performance
    View on GitHub↗14,667
Compare all 30 related projects→

Frequently asked questions

What does tencent/libco do?

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.

What are the main features of tencent/libco?

The main features of tencent/libco are: Cooperative Schedulers, User-Space Concurrency, High-Concurrency Networking, Stack-Copying Context Switches, Synchronous-to-Asynchronous Wrappers, System-Call Interception, Concurrent Thread Execution, Coroutine Libraries.

Which projects share features with tencent/libco?

Projects with overlapping indexed features include: hnes/libaco — libaco is a low-level C library for cooperative multitasking that provides a runtime for managing asymmetric… gevent/gevent — Gevent is a Python coroutine concurrency library and asynchronous task manager designed for high-concurrency I/O… python-trio/trio — Trio is an asynchronous I/O runtime and concurrency library for Python. It provides a system for executing… eclipse-vertx/vert.x — Vert.x is a reactive polyglot framework and asynchronous programming library for the Java Virtual Machine. It… walkor/workerman — Workerman is an event-driven asynchronous socket framework for PHP. It provides the core components necessary to build… yedf2/handy — Handy is a C++11 network server framework and event-driven networking engine designed for building high-performance…