cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Namespace of executors to process asynchronous tasks. More...
Classes | |
class | GeneralExecutor |
Class of general-purpose executors. More... | |
class | IAsyncExecutor |
Interface of executors to process asynchronous tasks and the processing can be started asynchronously. More... | |
class | IExecutor |
Interface of executors to process asynchronous tasks. More... | |
class | ISingleThreadExecutor |
Interface of single-threaded executors. More... | |
class | SingleThreadExecutor |
Class of executors runs in a single thread. More... | |
class | Timer |
Class of timers to call functions later. More... | |
class | WrappingExecutor |
Class to wrap existing executors. More... |
Typedefs | |
using | AsioContextType = asio::io_context |
Type of context in asio library. |
Enumerations | |
enum class | OperationType : std::uint8_t { TRANSPORT , CALLBACK } |
Enumeration of types of operations. More... |
Functions | |
template<typename Function> | |
void | async_invoke (const std::shared_ptr< IExecutor > &executor, OperationType type, Function &&function) |
Asynchronously invoke a function. | |
std::shared_ptr< IAsyncExecutor > | create_executor (std::shared_ptr< logging::Logger > logger, const config::ExecutorConfig &config) |
Create an executor. | |
std::shared_ptr< ISingleThreadExecutor > | create_single_thread_executor (std::shared_ptr< logging::Logger > logger) |
Create an executor runs in a single thread. | |
std::shared_ptr< IAsyncExecutor > | wrap_executor (std::shared_ptr< IExecutor > executor) |
Create a wrapper of an existing executor. |
Namespace of executors to process asynchronous tasks.
using msgpack_rpc::executors::AsioContextType = asio::io_context |
Type of context in asio library.
Definition at line 29 of file asio_context_type.h.
|
strong |
Enumeration of types of operations.
Enumerator | |
---|---|
TRANSPORT | Transport. |
CALLBACK | Execution of callbacks. |
Definition at line 29 of file operation_type.h.
void msgpack_rpc::executors::async_invoke | ( | const std::shared_ptr< IExecutor > & | executor, |
OperationType | type, | ||
Function && | function ) |
Asynchronously invoke a function.
Function | Type of the function. |
[in] | executor | Executor. |
[in] | type | Type of the operation. |
[in] | function | Function to invoke. |
Definition at line 42 of file async_invoke.h.
|
nodiscard |
Create an executor.
[in] | logger | Logger. |
[in] | config | Configuration. |
Definition at line 309 of file general_executor.cpp.
|
nodiscard |
Create an executor runs in a single thread.
[in] | logger | Logger. |
Definition at line 71 of file single_thread_executor.cpp.
|
nodiscard |
Create a wrapper of an existing executor.
[in] | executor | An existing executor. |
Definition at line 84 of file wrapping_executor.cpp.