diff options
author | dormando <dormando@rydia.net> | 2022-11-22 22:52:08 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2022-12-01 22:07:32 -0800 |
commit | 1ba5df8410e7ccc035390438e45b26c2d11ede5c (patch) | |
tree | ff0e1b06e15c411d8418a94e762cc7744fd12f07 /proxy.h | |
parent | 683bb98a55ba19f69c4e2a60b9104ed2edc971c3 (diff) | |
download | memcached-1ba5df8410e7ccc035390438e45b26c2d11ede5c.tar.gz |
proxy: add mcp.AWAIT_BACKGROUND
mcp.await(request, pools, 0, mcp.AWAIT_BACKGROUND) will, instead of
waiting on any request to return, simply return an empty table as soon
as the background requests are dispatched.
Diffstat (limited to 'proxy.h')
-rw-r--r-- | proxy.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -401,6 +401,7 @@ struct _io_pending_proxy_t { bool ascii_multiget; // passed on from mcp_r_t bool is_await; // are we an await object? bool await_first; // are we the main route for an await object? + bool await_background; // dummy IO for backgrounded awaits }; // Note: does *be have to be a sub-struct? how stable are userdata pointers? @@ -444,6 +445,7 @@ enum mcp_await_e { AWAIT_OK, // any non-error response AWAIT_FIRST, // return the result from the first pool AWAIT_FASTGOOD, // returns on first hit or majority non-error + AWAIT_BACKGROUND, // returns as soon as background jobs are dispatched }; int mcplib_await(lua_State *L); int mcplib_await_run(conn *c, mc_resp *resp, lua_State *L, int coro_ref); |