ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
task_group.hpp File Reference

Structured concurrency via task_group. More...

#include "../result.hpp"
#include <exception>
#include <functional>
#include <future>
#include <memory>
#include <mutex>
#include <system_error>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for task_group.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  threadschedule::detail::task_group_has_current_worker_query< Pool, typename >
 
struct  threadschedule::detail::task_group_has_current_worker_query< Pool, std::void_t< decltype(std::declval< Pool const & >().is_current_worker())> >
 
class  threadschedule::advanced::task_group< Pool >
 Scoped task group that ensures all submitted work completes before the group is destroyed. More...
 

Namespaces

namespace  threadschedule
 
namespace  threadschedule::detail
 Aggregates multiple thread_registry_backend instances into a single queryable view.
 
namespace  threadschedule::advanced
 

Functions

template<typename Pool >
auto threadschedule::detail::task_group_is_current_worker (Pool const &pool) noexcept -> bool
 

Detailed Description

Structured concurrency via task_group.

A task_group ties a set of tasks to a scope: all submitted tasks, including child tasks submitted to the same group by tracked tasks, are guaranteed to complete before wait() returns (or the destructor runs). This eliminates dangling-future bugs and makes exception propagation deterministic.

Definition in file task_group.hpp.