summaryrefslogtreecommitdiff
path: root/proxy_await.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2023-01-11 13:46:16 -0800
committerdormando <dormando@rydia.net>2023-01-11 21:37:55 -0800
commite660658748b04f865852e77b0aad1fd8301cd5ec (patch)
tree21d4017a4858c44c240e10b4c9a4b136812d2e0e /proxy_await.c
parentfccf7b9efdfb0deb11f111496ce53c5892647dab (diff)
downloadmemcached-e660658748b04f865852e77b0aad1fd8301cd5ec.tar.gz
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.
Diffstat (limited to 'proxy_await.c')
-rw-r--r--proxy_await.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proxy_await.c b/proxy_await.c
index 33e4cd3..582c3d5 100644
--- a/proxy_await.c
+++ b/proxy_await.c
@@ -147,6 +147,8 @@ static void mcp_queue_await_io(conn *c, lua_State *Lc, mcp_request_t *rq, int aw
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;
// io_p needs to hold onto its own response reference, because we may or
// may not include it in the final await() result.
@@ -201,6 +203,8 @@ static void mcp_queue_await_dummy_io(conn *c, lua_State *Lc, int await_ref) {
p->is_await = true;
p->await_ref = await_ref;
p->await_background = true;
+ p->return_cb = proxy_return_cb;
+ p->finalize_cb = proxy_finalize_cb;
// Dummy IO has no backend, and no request attached.