Changes for README.md: 9 added lines, 1 removed line.
Original line number
Diff line number
Diff line
tinyfiber
============
A cooperative lightweight multithreading system.
A cooperative lightweight job-system with a C-api. This library uses a N:M mapping between working threads and fibers. You can have thousands of fibers running from a thread pool without ever have a kernel thread switch.
A fiber system is a way to switch thread without involving the kernel. This makes the switches fast with a low over-head. A fiber can be seen as a data structure containing the current execution context, i.e. the states of the registers and a stack, importantly this includes the instruction pointer.
A fiber switch will not change thread, which means that a working pool of threads can exchange fibers. This means that you can not trust local thread storage variables between yields; mutex and semaphores will not work. This also includes all 3:rd part library functions you may call. If your project needs to use TLS in a matter that is not compatible with these constraints I recommend that you consider UMS (User-Mode Scheduling) or C++20 coroutines instead.