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.