diff options
author | dormando <dormando@rydia.net> | 2023-01-11 13:46:16 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2023-01-11 21:37:55 -0800 |
commit | e660658748b04f865852e77b0aad1fd8301cd5ec (patch) | |
tree | 21d4017a4858c44c240e10b4c9a4b136812d2e0e /proxy_await.c | |
parent | fccf7b9efdfb0deb11f111496ce53c5892647dab (diff) | |
download | memcached-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.c | 4 |
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. |