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

#include <lightweight_pool.hpp>

Inheritance diagram for threadschedule::advanced::lightweight_pool:
[legend]
Collaboration diagram for threadschedule::advanced::lightweight_pool:
[legend]

Public Member Functions

 lightweight_pool (worker_count count=worker_count::automatic(), worker_registration registration=worker_registration::disabled)
auto configure_workers (thread_config const &config) -> result< void >
auto distribute_workers () -> result< void >
auto is_current_worker () const noexcept -> bool
auto post (F &&function, Args &&... args) -> result< void >
void post_or_throw (F &&function, Args &&... args)
auto shutdown (shutdown_policy policy=shutdown_policy::drain) -> result< void >
auto shutdown_for (std::chrono::milliseconds timeout) -> result< bool >
auto size () const noexcept -> std::size_t

Detailed Description

Definition at line 8 of file lightweight_pool.hpp.

Constructor & Destructor Documentation

◆ lightweight_pool()

threadschedule::advanced::lightweight_pool::lightweight_pool ( worker_count count = worker_count::automatic(),
worker_registration registration = worker_registration::disabled )
inlineexplicit

Member Function Documentation

◆ configure_workers()

Definition at line 326 of file pool/facade.hpp.

◆ distribute_workers()

Definition at line 334 of file pool/facade.hpp.

◆ is_current_worker()

auto threadschedule::detail::lightweight_pool_facade< ::threadschedule::detail::lightweight_pool_backend >::is_current_worker ( ) const->bool
inlinenodiscardnoexcept

Definition at line 369 of file pool/facade.hpp.

◆ post()

auto threadschedule::detail::lightweight_pool_facade< ::threadschedule::detail::lightweight_pool_backend >::post ( F && function,
Args &&... args )->result< void >
inline

Definition at line 308 of file pool/facade.hpp.

◆ post_or_throw()

void threadschedule::detail::lightweight_pool_facade< ::threadschedule::detail::lightweight_pool_backend >::post_or_throw ( F && function,
Args &&... args )
inline

Definition at line 318 of file pool/facade.hpp.

◆ shutdown()

◆ shutdown_for()

auto threadschedule::detail::lightweight_pool_facade< ::threadschedule::detail::lightweight_pool_backend >::shutdown_for ( std::chrono::milliseconds timeout) ->result< bool >
inline

Definition at line 355 of file pool/facade.hpp.

◆ size()

Definition at line 363 of file pool/facade.hpp.


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