#include <generic_executor_ref.hpp>
type-erasure to store the works to do
template<typename Executor >
boost::executors::generic_executor_ref::generic_executor_ref |
( |
Executor & |
ex | ) |
|
|
inline |
void boost::executors::generic_executor_ref::close |
( |
| ) |
|
|
inline |
- Effects
- Close the
executor
for submissions. The worker threads will work until there is no more closures to run.
bool boost::executors::generic_executor_ref::closed |
( |
| ) |
|
|
inline |
- Returns
- Whether the pool is closed for submissions.
template<typename Pred >
bool boost::executors::generic_executor_ref::reschedule_until |
( |
Pred const & |
pred | ) |
|
|
inline |
- Requires
- This must be called from an scheduled task.
- Effects
- reschedule functions until pred()
References try_executing_one().
void boost::executors::generic_executor_ref::submit |
( |
BOOST_THREAD_RV_REF(work) |
closure | ) |
|
|
inline |
void boost::executors::generic_executor_ref::submit |
( |
void(*)() |
closure | ) |
|
|
inline |
- Requires
Closure
is a model of Callable(void()) and a model of CopyConstructible/MoveConstructible.
- Effects
- The specified closure will be scheduled for execution at some point in the future. If invoked closure throws an exception the thread pool will call std::terminate, as is the case with threads.
- Synchronization
- Completion of closure on a particular thread happens before destruction of thread's thread local variables.
- Throws
sync_queue_is_closed
if the thread pool is closed. Whatever exception that can be throw while storing the closure.
References boost::move(), and submit().
template<typename Closure >
void boost::executors::generic_executor_ref::submit |
( |
BOOST_THREAD_RV_REF(Closure) |
closure | ) |
|
|
inline |
bool boost::executors::generic_executor_ref::try_executing_one |
( |
| ) |
|
|
inline |
- Effects
- Try to execute one task.
- Returns
- Whether a task has been executed.
- Throws
- Whatever the current task constructor throws or the task() throws.
Referenced by reschedule_until().
The documentation for this class was generated from the following file: