ThreadSchedule 4.1.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::advanced::inline_pool Class Referencefinal

#include <inline_pool.hpp>

Public Member Functions

 inline_pool ()=default
template<typename F, typename... Args>
auto submit (F &&function, Args &&... args) -> result< std::future< detail::bind_result_t< F, Args... > > >
template<typename F, typename... Args>
auto submit_or_throw (F &&function, Args &&... args) -> std::future< detail::bind_result_t< F, Args... > >
template<typename F, typename... Args>
auto post (F &&function, Args &&... args) -> result< void >
template<typename F, typename... Args>
void post_or_throw (F &&function, Args &&... args)
template<typename Iterator>
auto submit_batch (Iterator begin, Iterator end) -> result< std::vector< std::future< void > > >
template<typename Iterator>
auto submit_batch_or_throw (Iterator begin, Iterator end) -> std::vector< std::future< void > >
template<typename Iterator, typename Function>
auto parallel_for_each (Iterator begin, Iterator end, Function &&function) -> result< void >
auto wait () -> result< void >
auto shutdown (shutdown_policy policy=shutdown_policy::drain) -> result< void >
auto size () const noexcept -> std::size_t
auto pending_tasks () const noexcept -> std::size_t

Detailed Description

Definition at line 20 of file inline_pool.hpp.

Constructor & Destructor Documentation

◆ inline_pool()

threadschedule::advanced::inline_pool::inline_pool ( )
default

Member Function Documentation

◆ parallel_for_each()

template<typename Iterator, typename Function>
auto threadschedule::advanced::inline_pool::parallel_for_each ( Iterator begin,
Iterator end,
Function && function )->result< void >
inline

◆ pending_tasks()

auto threadschedule::advanced::inline_pool::pending_tasks ( ) const->std::size_t
inlinenodiscardnoexcept

Definition at line 109 of file inline_pool.hpp.

◆ post()

template<typename F, typename... Args>
auto threadschedule::advanced::inline_pool::post ( F && function,
Args &&... args )->result< void >
inline

Definition at line 44 of file inline_pool.hpp.

Referenced by post_or_throw().

◆ post_or_throw()

template<typename F, typename... Args>
void threadschedule::advanced::inline_pool::post_or_throw ( F && function,
Args &&... args )
inline

Definition at line 51 of file inline_pool.hpp.

References post().

◆ shutdown()

auto threadschedule::advanced::inline_pool::shutdown ( shutdown_policy policy = shutdown_policy::drain) ->result< void >
inline

Definition at line 96 of file inline_pool.hpp.

References threadschedule::drain, and threadschedule::detail::to_native().

◆ size()

auto threadschedule::advanced::inline_pool::size ( ) const->std::size_t
inlinenodiscardnoexcept

Definition at line 103 of file inline_pool.hpp.

◆ submit()

template<typename F, typename... Args>
auto threadschedule::advanced::inline_pool::submit ( F && function,
Args &&... args )->result< std::future< detail::bind_result_t< F, Args... > > >
inline

Definition at line 27 of file inline_pool.hpp.

Referenced by submit_or_throw().

◆ submit_batch()

template<typename Iterator>
auto threadschedule::advanced::inline_pool::submit_batch ( Iterator begin,
Iterator end )->result< std::vector< std::future< void > > >
inline

Definition at line 60 of file inline_pool.hpp.

Referenced by submit_batch_or_throw().

◆ submit_batch_or_throw()

template<typename Iterator>
auto threadschedule::advanced::inline_pool::submit_batch_or_throw ( Iterator begin,
Iterator end )->std::vector< std::future< void > >
inline

Definition at line 67 of file inline_pool.hpp.

References submit_batch().

◆ submit_or_throw()

template<typename F, typename... Args>
auto threadschedule::advanced::inline_pool::submit_or_throw ( F && function,
Args &&... args )->std::future< detail::bind_result_t< F, Args... > >
inline

Definition at line 34 of file inline_pool.hpp.

References submit().

◆ wait()

auto threadschedule::advanced::inline_pool::wait ( ) ->result< void >
inline

Definition at line 89 of file inline_pool.hpp.


The documentation for this class was generated from the following file: