cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Interface of executors to process asynchronous tasks and the processing can be started asynchronously. More...
#include <msgpack_rpc/executors/i_async_executor.h>
Public Member Functions | |
IAsyncExecutor (const IAsyncExecutor &)=delete | |
IAsyncExecutor (IAsyncExecutor &&)=delete | |
~IAsyncExecutor () noexcept override=default | |
Destructor. | |
virtual bool | is_running ()=0 |
Check whether this executor is running. | |
virtual std::exception_ptr | last_exception ()=0 |
Get the last exception thrown in asynchronous tasks. | |
virtual void | on_exception (std::function< void(std::exception_ptr)> exception_callback)=0 |
Register a function called when an exception is thrown in asynchronous tasks. | |
IAsyncExecutor & | operator= (const IAsyncExecutor &)=delete |
IAsyncExecutor & | operator= (IAsyncExecutor &&)=delete |
virtual void | start ()=0 |
Start internal event loops to process asynchronous tasks. | |
virtual void | stop ()=0 |
Stops operation. | |
Public Member Functions inherited from msgpack_rpc::executors::IExecutor | |
IExecutor (const IExecutor &)=delete | |
IExecutor (IExecutor &&)=delete | |
virtual | ~IExecutor () noexcept=default |
Destructor. | |
virtual AsioContextType & | context (OperationType type) noexcept=0 |
Get the context in asio library. | |
IExecutor & | operator= (const IExecutor &)=delete |
IExecutor & | operator= (IExecutor &&)=delete |
Protected Member Functions | |
IAsyncExecutor () noexcept=default | |
Constructor. | |
Protected Member Functions inherited from msgpack_rpc::executors::IExecutor | |
IExecutor () noexcept=default | |
Constructor. |
Interface of executors to process asynchronous tasks and the processing can be started asynchronously.
Definition at line 37 of file i_async_executor.h.
|
nodiscardpure virtual |
Check whether this executor is running.
true | This executor is running. |
false | This executor is not running. |
Implemented in msgpack_rpc::executors::GeneralExecutor, and msgpack_rpc::executors::WrappingExecutor.
|
nodiscardpure virtual |
Get the last exception thrown in asynchronous tasks.
Implemented in msgpack_rpc::executors::GeneralExecutor, and msgpack_rpc::executors::WrappingExecutor.
|
pure virtual |
Register a function called when an exception is thrown in asynchronous tasks.
[in] | exception_callback | Function called when an exception is thrown in asynchronous tasks. The pointer of the exception is passed as an argument. |
Implemented in msgpack_rpc::executors::GeneralExecutor, and msgpack_rpc::executors::WrappingExecutor.
|
pure virtual |
Start internal event loops to process asynchronous tasks.
Implemented in msgpack_rpc::executors::GeneralExecutor, and msgpack_rpc::executors::WrappingExecutor.
|
pure virtual |
Stops operation.
Implemented in msgpack_rpc::executors::GeneralExecutor, and msgpack_rpc::executors::WrappingExecutor.