![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
Single element task queue used to handle recursive capnp calls. More...
#include <proxy-io.h>
Public Member Functions | |
Waiter ()=default | |
template<typename Fn > | |
void | post (Fn &&fn) |
template<class Predicate > | |
void | wait (std::unique_lock< std::mutex > &lock, Predicate pred) |
Public Attributes | |
std::mutex | m_mutex |
std::condition_variable | m_cv |
std::function< void()> | m_fn |
Single element task queue used to handle recursive capnp calls.
(If server makes an callback into the client in the middle of a request, while client thread is blocked waiting for server response, this is what allows the client to run the request in the same thread, the same way code would run in single process, with the callback sharing same thread stack as the original call.
Definition at line 243 of file proxy-io.h.
|
default |
|
inline |
|
inline |
Definition at line 257 of file proxy-io.h.
std::condition_variable mp::Waiter::m_cv |
Definition at line 278 of file proxy-io.h.
std::function<void()> mp::Waiter::m_fn |
Definition at line 279 of file proxy-io.h.
std::mutex mp::Waiter::m_mutex |
Definition at line 277 of file proxy-io.h.