|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
A pool that executes every task inline on the calling thread. More...
#include <inline_pool_backend.hpp>
Public Member Functions | |
| inline_pool_backend (size_t=0) | |
| template<typename F , typename... Args> | |
| auto | submit (F &&f, Args &&... args) -> std::future< bind_result_t< F, Args... > > |
| template<typename F , typename... Args> | |
| auto | try_submit (F &&f, Args &&... args) -> expected< std::future< bind_result_t< F, Args... > >, std::error_code > |
| template<typename F , typename... Args> | |
| void | post (F &&f, Args &&... args) |
| template<typename F , typename... Args> | |
| auto | try_post (F &&f, Args &&... args) -> expected< void, std::error_code > |
| template<typename Iterator > | |
| auto | try_submit_batch (Iterator begin, Iterator end) -> expected< std::vector< std::future< void > >, std::error_code > |
| template<typename Iterator > | |
| auto | submit_batch (Iterator begin, Iterator end) -> std::vector< std::future< void > > |
| template<typename Iterator , typename F > | |
| void | parallel_for_each (Iterator begin, Iterator end, F &&func) |
| auto | size () const noexcept -> size_t |
| auto | pending_tasks () const noexcept -> size_t |
| void | wait_for_tasks () |
| void | shutdown (shutdown_policy_backend=shutdown_policy_backend::drain) |
A pool that executes every task inline on the calling thread.
Useful for deterministic unit testing: tasks run synchronously in submission order with no concurrency, making results fully reproducible and debuggable.
Definition at line 45 of file inline_pool_backend.hpp.
|
inlineexplicit |
Definition at line 48 of file inline_pool_backend.hpp.
|
inline |
Definition at line 153 of file inline_pool_backend.hpp.
Referenced by threadschedule::advanced::inline_pool::parallel_for_each().
|
inlinenoexcept |
Definition at line 169 of file inline_pool_backend.hpp.
|
inline |
Definition at line 92 of file inline_pool_backend.hpp.
References try_post().
|
inline |
Definition at line 179 of file inline_pool_backend.hpp.
Referenced by threadschedule::advanced::inline_pool::shutdown().
|
inlinenoexcept |
Definition at line 164 of file inline_pool_backend.hpp.
|
inline |
Definition at line 52 of file inline_pool_backend.hpp.
References threadschedule::expected< T, E >::has_value(), try_submit(), and threadschedule::expected< T, E >::value().
|
inline |
Definition at line 143 of file inline_pool_backend.hpp.
References threadschedule::expected< T, E >::has_value(), try_submit_batch(), and threadschedule::expected< T, E >::value().
|
inline |
Definition at line 101 of file inline_pool_backend.hpp.
References threadschedule::detail::bind_args().
Referenced by post(), and threadschedule::advanced::inline_pool::post().
|
inline |
Definition at line 62 of file inline_pool_backend.hpp.
References threadschedule::detail::bind_args().
Referenced by submit(), and threadschedule::advanced::inline_pool::submit().
|
inline |
Definition at line 118 of file inline_pool_backend.hpp.
Referenced by threadschedule::advanced::inline_pool::submit_batch(), and submit_batch().
|
inline |
Definition at line 175 of file inline_pool_backend.hpp.
Referenced by threadschedule::advanced::inline_pool::wait().