2
3
6
7
8
9
11#include <so_5/disp/abstract_work_thread.hpp>
13#include <so_5/details/suppress_exceptions.hpp>
44
45
46
47
48
49
50
51
52
53
54
55
56
66 start( body_func_t thread_body )
override
68 m_thread = std::thread{
69 [tb = std::move(thread_body)] {
71 so_5::details::suppress_exceptions( [&tb]() { tb(); } );
90
91
92
93
94
95
96
97
98
108 return *(
new std_work_thread_t{});
130 return std::make_shared<
131 std_work_thread_impl::std_work_thread_factory_t >();
An interface of factory for management of worker threads.
virtual ~abstract_work_thread_factory_t()
abstract_work_thread_factory_t()
An interface for one worker thread.
virtual ~abstract_work_thread_t()
The standard implementation of abstract_work_thread_factory interface.
abstract_work_thread_t & acquire(so_5::environment_t &) override
Get a new worker thread from factory.
void release(abstract_work_thread_t &thread) noexcept override
Return a worker thread back to the factory.
std_work_thread_factory_t()=default
The standard implementation of abstract_work_thread interface.
void join() override
Stops the current thread until worker thread completes execution of thread_body passed to previous ca...
std_work_thread_t()=default
void start(body_func_t thread_body) override
Start a new thread and execute specified functor on it.
std::thread m_thread
Actual thread.
SO_5_FUNC abstract_work_thread_factory_shptr_t make_std_work_thread_factory()
Get a standard SObjectizer's work thread factory that is used by default.
Private part of message limit implementation.