Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

Next

Chapter 1. Fiber

Oliver Kowalke

Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

Overview
Implementations: fcontext_t, ucontext_t and WinFiber
Fiber management
Class fiber
Class fiber::id
Namespace this_fiber
Scheduling
Stack allocation
Support for valgrind
Support for sanitizers
Synchronization
Mutex Types
Condition Variables
Barriers
Channels
Buffered Channel
Unbuffered Channel
Futures
Future
Template promise<>
Template packaged_task<>
Fiber local storage
Migrating fibers between threads
Integrating Fibers with Asynchronous Callbacks
Overview
Return Errorcode
Success or Exception
Return Errorcode or Data
Data or Exception
Success/Error Virtual Methods
Then There’s Boost.Asio
Integrating Fibers with Nonblocking I/O
when_any / when_all functionality
when_any
when_any, simple completion
when_any, return value
when_any, produce first outcome, whether result or exception
when_any, produce first success
when_any, heterogeneous types
when_any, a dubious alternative
when_all functionality
when_all, simple completion
when_all, return values
when_all until first exception
wait_all, collecting all exceptions
when_all, heterogeneous types
Sharing a Thread with Another Main Loop
Overview
Event-Driven Program
Embedded Main Loop
Deeper Dive into Boost.Asio
Specualtive execution
NUMA
GPU computing
CUDA
ROCm/HIP
Running with worker threads
Performance
Tuning
Customization
Rationale
Acknowledgments

Next