![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
#include <proxy-io.h>
Public Member Functions | |
| ProxyServer (Connection &connection, ThreadContext &thread_context, std::thread &&thread) | |
| ~ProxyServer () | |
| kj::Promise< void > | getName (GetNameContext context) override |
| template<typename T , typename Fn > | |
| kj::Promise< T > | post (Fn &&fn) |
| Run a callback function fn returning T on this thread. | |
Public Attributes | |
| EventLoopRef | m_loop |
| ThreadContext & | m_thread_context |
| std::thread | m_thread |
| kj::Promise< void > | m_thread_ready {kj::READY_NOW} |
| Promise signaled when m_thread_context.waiter is ready and there is no post() callback function waiting to execute. | |
Definition at line 101 of file proxy-io.h.
| mp::ProxyServer< Thread >::ProxyServer | ( | Connection & | connection, |
| ThreadContext & | thread_context, | ||
| std::thread && | thread | ||
| ) |
| mp::ProxyServer< Thread >::~ProxyServer | ( | ) |
Reset thread context waiter pointer, as shutdown signal for done lambda passed as waiter->wait() argument in makeThread code below.
Assert waiter is idle. This destructor shouldn't be getting called if it is busy.
Ping waiter.
Definition at line 440 of file proxy.cpp.
|
override |
| kj::Promise< T > mp::ProxyServer< Thread >::post | ( | Fn && | fn | ) |
Run a callback function fn returning T on this thread.
The function will be queued and executed as soon as the thread is idle, and when fn returns, the promise returned by this method will be fulfilled with the value fn returned.
Definition at line 795 of file proxy-io.h.
| EventLoopRef mp::ProxyServer< Thread >::m_loop |
Definition at line 115 of file proxy-io.h.
| std::thread mp::ProxyServer< Thread >::m_thread |
Definition at line 117 of file proxy-io.h.
| ThreadContext& mp::ProxyServer< Thread >::m_thread_context |
Definition at line 116 of file proxy-io.h.
| kj::Promise<void> mp::ProxyServer< Thread >::m_thread_ready {kj::READY_NOW} |
Promise signaled when m_thread_context.waiter is ready and there is no post() callback function waiting to execute.
Definition at line 120 of file proxy-io.h.