From e660658748b04f865852e77b0aad1fd8301cd5ec Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 11 Jan 2023 13:46:16 -0800 Subject: core: simplify background IO API - removes unused "completed" IO callback handler - moves primary post-IO callback handlers from the queue definition to the actual IO objects. - allows IO object callbacks to be handled generically instead of based on the queue they were submitted from. --- proto_proxy.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'proto_proxy.c') diff --git a/proto_proxy.c b/proto_proxy.c index eb6f5e6..01b368d 100644 --- a/proto_proxy.c +++ b/proto_proxy.c @@ -289,10 +289,6 @@ void proxy_submit_cb(io_queue_t *q) { return; } -void proxy_complete_cb(io_queue_t *q) { - // empty/unused. -} - // called from worker thread after an individual IO has been returned back to // the worker thread. Do post-IO run and cleanup work. void proxy_return_cb(io_pending_t *pending) { @@ -892,6 +888,8 @@ static void mcp_queue_io(conn *c, mc_resp *resp, int coro_ref, lua_State *Lc) { p->client_resp = r; p->flushed = false; p->ascii_multiget = rq->ascii_multiget; + p->return_cb = proxy_return_cb; + p->finalize_cb = proxy_finalize_cb; resp->io_pending = (io_pending_t *)p; // top of the main thread should be our coroutine. -- cgit v1.2.1