diff options
author | dormando <dormando@rydia.net> | 2021-07-30 15:06:05 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2021-08-09 17:09:08 -0700 |
commit | 57493bfca4d16f19aa6d591d29f19f3d2ad160f8 (patch) | |
tree | 24f78fa1f5b5842be2cf2ca7f108367f198d610c /storage.h | |
parent | c25d0bd68ab0f6226c2d979bf0951923624926dd (diff) | |
download | memcached-57493bfca4d16f19aa6d591d29f19f3d2ad160f8.tar.gz |
core: io_queue_t flow mode
instead of passing ownership of (io_queue_t)*q to the side thread,
instead the ownership of IO objects are passed to the side thread, which
are then individually returned. The worker thread runs return_cb() on
each, determining when it's done with the response batch.
this interface could use more explicit functions to make it more clear.
Ownership of *q isn't actually "passed" anywhere, it's just used or not
used depending on which return function the owner wants.
Diffstat (limited to 'storage.h')
-rw-r--r-- | storage.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,9 +18,9 @@ bool storage_validate_item(void *e, item *it); int storage_get_item(conn *c, item *it, mc_resp *resp); // callbacks for the IO queue subsystem. -void storage_submit_cb(void *ctx, void *stack); -void storage_complete_cb(void *ctx, void *stack); -void storage_finalize_cb(io_pending_t *pending); +void storage_submit_cb(io_queue_t *q); +void storage_complete_cb(io_queue_t *q); +int storage_finalize_cb(io_pending_t *pending); // Thread functions. int start_storage_write_thread(void *arg); |