kassane/fiber — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2024-09-04
Build a game engine that runs AI, physics, and audio tasks concurrently in one thread.
Write a high-frequency trading system that switches between tasks with minimal latency.
Create a network server handling thousands of concurrent connections without OS thread overhead.
| kassane/fiber | 9veedz/4leggedspiderbot | cantaro86/time-series | |
|---|---|---|---|
| Stars | 2 | 2 | 2 |
| Language | C++ | C++ | C++ |
| Last pushed | 2024-09-04 | — | 2020-02-26 |
| Maintenance | Stale | — | Dormant |
| Setup difficulty | moderate | hard | moderate |
| Complexity | 3/5 | 4/5 | 2/5 |
| Audience | developer | vibe coder | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a C++11 compiler, the Zig build system mentioned in the repo isn't detailed in the README.
Boost.fiber is a C++ library that lets a program juggle multiple tasks at once within a single thread of execution. Instead of relying on the operating system to forcibly swap between tasks, which is expensive and unpredictable, this library lets each task voluntarily pause itself and hand control over to the next one. The result is a way to handle many concurrent operations with very little overhead. Under the hood, it works by taking a snapshot of exactly what the program is doing at any moment, things like CPU registers, the instruction pointer, and the stack pointer, and saving it. When a task yields, that snapshot is tucked away and another task's saved state is restored. This "context switch" is extremely fast, typically taking fewer than 100 CPU cycles compared to thousands of cycles for a traditional thread switch. It's designed to feel familiar to developers who have used standard threading libraries, offering similar classes and functions for managing and synchronizing tasks. Developers building high-performance applications, like game engines, real-time trading systems, or network servers, would use this when they need to run thousands of concurrent tasks without the heavy performance penalties of operating system threads. For example, a game might use it to run character AI, physics calculations, and audio processing side by side, where each task can politely step aside when it hits a natural stopping point. The cooperative model means the developer has precise control over when tasks switch, avoiding the unpredictable pauses that preemptive threading can introduce. The project requires a C++11 compiler or newer. The README doesn't go into detail about the specific Zig build system mentioned in the repository description, so the focus remains squarely on the core C++ library itself and its approach to lightweight, cooperative multitasking.
A C++ library for lightweight cooperative multitasking, letting a program run thousands of concurrent tasks in a single thread with very little overhead.
Mainly C++. The stack also includes C++, C++11, Zig.
Stale — no commits in 1-2 years (last push 2024-09-04).
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.