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 /thread.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 'thread.c')
-rw-r--r-- | thread.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -482,12 +482,11 @@ static void setup_thread(LIBEVENT_THREAD *me) { // me->storage is set just before this function is called. if (me->storage) { thread_io_queue_add(me, IO_QUEUE_EXTSTORE, me->storage, - storage_submit_cb, storage_complete_cb, NULL, storage_finalize_cb); + storage_submit_cb); } #endif #ifdef PROXY - thread_io_queue_add(me, IO_QUEUE_PROXY, settings.proxy_ctx, proxy_submit_cb, - proxy_complete_cb, proxy_return_cb, proxy_finalize_cb); + thread_io_queue_add(me, IO_QUEUE_PROXY, settings.proxy_ctx, proxy_submit_cb); // TODO: maybe register hooks to be called here from sub-packages? ie; // extstore, TLS, proxy. @@ -495,7 +494,7 @@ static void setup_thread(LIBEVENT_THREAD *me) { proxy_thread_init(settings.proxy_ctx, me); } #endif - thread_io_queue_add(me, IO_QUEUE_NONE, NULL, NULL, NULL, NULL, NULL); + thread_io_queue_add(me, IO_QUEUE_NONE, NULL, NULL); } /* |