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 /proto_proxy.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 'proto_proxy.c')
-rw-r--r-- | proto_proxy.c | 6 |
1 files changed, 2 insertions, 4 deletions
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. |