Cancellability is now implemented in the address queries of the explore endpoint. I've got a little more organizing to do (push a couple calls into the database), but I consider this endpoint complete (for http, not yet https or ws/wss).
Without cancellation, a query initiated by a client (e.g. browser) would keep running until complete, even after the connection was closed, either by the caller disconnecting, a channel timeout, or a node stop. This is always the case, but with all queries in the few ms range it wasn't an issue. But the address queries are essentially unbounded, and can take minutes for the largest addresses. So now these queries are executed off of the channel strand, and are passed a reference to std::atomic_bool protocol_explore::stopping_{} which is updated in the strand:
void protocol_explore::stopping(const code& ec) NOEXCEPT
{
BC_ASSERT(stranded());
stopping_.store(true);
dispatcher_.stop(ec);
protocol_html::stopping(ec);
}So now these query terminations are immediate for anything that cases a channel stop.