|
CARLA
|
An RPC server in which functions can be bind to run synchronously or asynchronously. More...
#include <Server.h>
Public Member Functions | |
| void | AsyncRun (size_t worker_threads) |
| template<typename FunctorT > | |
| void | BindAsync (const std::string &name, FunctorT &&functor) |
| template<typename FunctorT > | |
| void | BindSync (const std::string &name, FunctorT &&functor) |
| template<typename... Args> | |
| Server (Args &&... args) | |
| void | Stop () |
| void | SyncRunFor (time_duration duration) |
Private Attributes | |
| ::rpc::server | _server |
| std::atomic_bool | _shutdown_in_progress {false} |
| boost::asio::io_context | _sync_io_context |
An RPC server in which functions can be bind to run synchronously or asynchronously.
Use AsyncRun to start the worker threads, and use SyncRunFor to run a slice of work in the caller's thread.
Functions that are bind using BindAsync will run asynchronously in the worker threads. Functions that are bind using BindSync will run within SyncRunFor function.
Definition at line 40 of file rpc/Server.h.
|
inlineexplicit |
Definition at line 159 of file rpc/Server.h.
References _server.
|
inline |
|
inline |
Definition at line 173 of file rpc/Server.h.
References _server.
Referenced by ServerBinder::operator<<().
|
inline |
Definition at line 165 of file rpc/Server.h.
References _server, _shutdown_in_progress, and _sync_io_context.
Referenced by ServerBinder::operator<<(), TEST(), and TEST().
|
inline |
Definition at line 67 of file rpc/Server.h.
References _server, and _shutdown_in_progress.
|
inline |
Definition at line 56 of file rpc/Server.h.
References _sync_io_context, and carla::time_duration::to_chrono().
Referenced by TEST().
|
private |
Definition at line 76 of file rpc/Server.h.
Referenced by AsyncRun(), BindAsync(), BindSync(), Server(), and Stop().
|
private |
Definition at line 77 of file rpc/Server.h.
Referenced by BindSync(), and Stop().
|
private |
Definition at line 74 of file rpc/Server.h.
Referenced by BindSync(), and SyncRunFor().