stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Loading...
Searching...
No Matches
concurrency

Detailed Description

Headers under stlab/concurrency/ .

Abstractions for multi-core algorithms with less contention: futures, channels, executors, and related utilities.

stlab::future differs from std::future in several ways:

  • Continuations (then, recover) and combinators (when_all, when_any).
  • Multiple continuations from the same future when the value type is copyable.
  • Cancellation of uniquely contributing work when a future or packaged_task is destroyed before completion.
  • Custom executors and automatic flattening of future<future<T>> to future<T>.

A default executor uses the system thread pool when the platform provides one; otherwise a portable task-stealing implementation is used (see default_executor).

Tooling: building tests uses CMake and doctest. Contributors include Sean Parent, Foster Brereton, Felix Petriconi, and others.

Topics

 await
 Blocking wait helpers for futures (await, blocking_get, etc.).
 channel
 Process-oriented channels (sender/receiver) and related types.
 default_executor
 Default thread-pool style executors (platform task system).
 executor_base
 Executor type aliases and scheduling helpers.
 future
 Futures, packaged tasks, channels, and coroutine integration.
 immediate_executor
 Synchronous inline executor.
 main_executor
 Main-thread / UI-thread executor (Qt, libdispatch, Emscripten, etc.).
 progress
 Progress tracking wrapper for concurrent tasks.
 ready_future
 Factory functions for already-resolved futures.
 serial_queue
 Serial executor and scheduling modes built on futures.
 set_current_thread_name
 Set the current thread name (platform-specific).
 system_timer
 System timer / delayed execution (platform run loop or portable thread).
 task
 Move-only callable wrapper for executor scheduling (task<Signature>).
 traits
 Type traits and detection helpers used by the concurrency library.
 tuple_algorithm
 Tuple algorithms and utilities (including for future combiners).