Bitcoin full node and query server

Aug 8, 2018

View in context in the libbitcoin Slack #general mirror.

N
narodnik06:54
@fpelliccioni because the subscriber needs to access a reference to itself using shared_from_this() and there are other classes which need the subscriber to be a shared_ptr (because it is instantiated after the constructor or the reference is shared among multiple classes).
2 replies · fpelliccioni · last Aug 09, 2018
fpelliccioni01:39
Thanks for your answer... I see :
fpelliccioni01:39
template <typename... Args>
void subscriber<Args...>::relay(Args... args)
{
    // This enqueues work while maintaining order.
    dispatch_.ordered(&subscriber<Args...>::do_invoke,
        this->shared_from_this(), args...);
}