]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fiber/README.md
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / fiber / README.md
1 boost.fiber
2 ===========
3
4 boost.fiber provides a framework for micro-/userland-threads (fibers) scheduled cooperatively.
5 The API contains classes and functions to manage and synchronize fibers similiar to boost.thread.
6
7 A fiber is able to store the current execution state, including all registers and CPU flags, the
8 instruction pointer, and the stack pointer and later restore this state. The idea is to have multiple
9 execution paths running on a single thread using a sort of cooperative scheduling (threads are
10 preemptively scheduled) - the running fiber decides explicitly when it yields to allow another fiber to
11 run (context switching).
12
13 A context switch between threads costs usally thousands of CPU cycles on x86 compared to a fiber switch
14 with less than 100 cycles. A fiber can only run on a single thread at any point in time.
15
16 boost.fiber requires C++11!