Class of internal implementation of future objects to get results of RPCs asynchronously.
More...
#include <msgpack_rpc/clients/impl/call_future_impl.h>
|
messages::CallResult | get_result_impl () |
| Get the result assuming the result is already set.
|
void | wait () |
| Wait the result.
|
void | wait_for (std::chrono::nanoseconds timeout) |
| Wait the result for the given time.
|
void | wait_until_impl (std::chrono::steady_clock::time_point deadline) |
| Wait the result until the given deadline without consideration of the deadline of the RPC.
|
|
| ICallFutureImpl () noexcept=default |
| Constructor.
|
Class of internal implementation of future objects to get results of RPCs asynchronously.
Definition at line 42 of file call_future_impl.h.
◆ CallFutureImpl()
msgpack_rpc::clients::impl::CallFutureImpl::CallFutureImpl |
( |
std::chrono::steady_clock::time_point | deadline | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
[in] | deadline | Deadline of the result of the RPC. |
Definition at line 51 of file call_future_impl.h.
◆ get_result()
|
inlinenodiscardoverridevirtual |
◆ get_result_impl()
Get the result assuming the result is already set.
- Returns
- Result.
Definition at line 144 of file call_future_impl.h.
◆ get_result_within()
messages::CallResult msgpack_rpc::clients::impl::CallFutureImpl::get_result_within |
( |
std::chrono::nanoseconds | timeout | ) |
|
|
inlinenodiscardoverridevirtual |
◆ set() [1/2]
void msgpack_rpc::clients::impl::CallFutureImpl::set |
( |
const Status & | error | ) |
|
|
inline |
◆ set() [2/2]
◆ wait()
void msgpack_rpc::clients::impl::CallFutureImpl::wait |
( |
| ) |
|
|
inlineprivate |
◆ wait_for()
void msgpack_rpc::clients::impl::CallFutureImpl::wait_for |
( |
std::chrono::nanoseconds | timeout | ) |
|
|
inlineprivate |
Wait the result for the given time.
- Parameters
-
[in] | timeout | Duration of timeout of waiting. |
Definition at line 118 of file call_future_impl.h.
◆ wait_until_impl()
void msgpack_rpc::clients::impl::CallFutureImpl::wait_until_impl |
( |
std::chrono::steady_clock::time_point | deadline | ) |
|
|
inlineprivate |
Wait the result until the given deadline without consideration of the deadline of the RPC.
- Parameters
-
[in] | deadline | Deadline of waiting. |
Definition at line 130 of file call_future_impl.h.
◆ deadline_
std::chrono::steady_clock::time_point msgpack_rpc::clients::impl::CallFutureImpl::deadline_ |
|
private |
◆ is_set_
bool msgpack_rpc::clients::impl::CallFutureImpl::is_set_ {false} |
|
private |
◆ is_set_cond_var_
std::condition_variable msgpack_rpc::clients::impl::CallFutureImpl::is_set_cond_var_ {} |
|
private |
◆ is_set_mutex_
std::mutex msgpack_rpc::clients::impl::CallFutureImpl::is_set_mutex_ {} |
|
private |
Mutex of is_set_.
- This mutex should be locked for use of is_set_.
- If is_set_ is set to true, result_ and status_ can be used without locks.
Definition at line 170 of file call_future_impl.h.
◆ result_
◆ status_
Status msgpack_rpc::clients::impl::CallFutureImpl::status_ {} |
|
private |
The documentation for this class was generated from the following file: