![]() |
Bitcoin Core 31.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. More... | |
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. More... | |
Definition at line 95 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 375 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 717 of file proxy-io.h.
| EventLoopRef mp::ProxyServer< Thread >::m_loop |
Definition at line 109 of file proxy-io.h.
| std::thread mp::ProxyServer< Thread >::m_thread |
Definition at line 111 of file proxy-io.h.
| ThreadContext& mp::ProxyServer< Thread >::m_thread_context |
Definition at line 110 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 114 of file proxy-io.h.