Clementine
Public Types | Public Member Functions | List of all members
asio::executor_work_guard< Executor, typename > Class Template Reference

An object of type executor_work_guard controls ownership of executor work within a scope. More...

#include <executor_work_guard.hpp>

Public Types

typedef Executor executor_type
 The underlying executor type.
 

Public Member Functions

 executor_work_guard (const executor_type &e) ASIO_NOEXCEPT
 Constructs a executor_work_guard object for the specified executor. More...
 
 executor_work_guard (const executor_work_guard &other) ASIO_NOEXCEPT
 Copy constructor.
 
 ~executor_work_guard ()
 Destructor. More...
 
executor_type get_executor () const ASIO_NOEXCEPT
 Obtain the associated executor.
 
bool owns_work () const ASIO_NOEXCEPT
 Whether the executor_work_guard object owns some outstanding work.
 
void reset () ASIO_NOEXCEPT
 Indicate that the work is no longer outstanding. More...
 

Detailed Description

template<typename Executor, typename>
class asio::executor_work_guard< Executor, typename >

An object of type executor_work_guard controls ownership of executor work within a scope.

Constructor & Destructor Documentation

◆ executor_work_guard()

template<typename Executor, typename >
asio::executor_work_guard< Executor, typename >::executor_work_guard ( const executor_type e)
inlineexplicit

Constructs a executor_work_guard object for the specified executor.

Stores a copy of e and calls on_work_started() on it.

◆ ~executor_work_guard()

template<typename Executor, typename >
asio::executor_work_guard< Executor, typename >::~executor_work_guard ( )
inline

Destructor.

Unless the object has already been reset, or is in a moved-from state, calls on_work_finished() on the stored executor.

Member Function Documentation

◆ reset()

template<typename Executor, typename >
void asio::executor_work_guard< Executor, typename >::reset ( )
inline

Indicate that the work is no longer outstanding.

Unless the object has already been reset, or is in a moved-from state, calls on_work_finished() on the stored executor.


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