diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-12-27 17:46:17 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-12-27 17:46:17 +0300 |
commit | 89c0f7c5db5003b8fd8df3e1babb0c802004bf4c (patch) | |
tree | 7ac164d6fe41fd76beb3d328e6fde4020f744b63 /src/go/unit/nxt_go_run_ctx.h | |
parent | 45d08d5145c63fd788f85d9e789314dcf093c99e (diff) | |
download | unit-89c0f7c5db5003b8fd8df3e1babb0c802004bf4c.tar.gz unit-89c0f7c5db5003b8fd8df3e1babb0c802004bf4c.tar.bz2 |
Implementing the ability to cancel request before worker starts processing it.
Diffstat (limited to 'src/go/unit/nxt_go_run_ctx.h')
-rw-r--r-- | src/go/unit/nxt_go_run_ctx.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/go/unit/nxt_go_run_ctx.h b/src/go/unit/nxt_go_run_ctx.h index f35b48de..5c6775ab 100644 --- a/src/go/unit/nxt_go_run_ctx.h +++ b/src/go/unit/nxt_go_run_ctx.h @@ -29,6 +29,8 @@ struct nxt_go_msg_s { nxt_port_mmap_msg_t *mmap_msg; nxt_port_mmap_msg_t *end; + nxt_port_mmap_tracking_msg_t *tracking; + nxt_go_msg_t *next; }; @@ -38,6 +40,7 @@ typedef struct { nxt_go_process_t *process; nxt_port_mmap_msg_t *wmmap_msg; + nxt_bool_t cancelled; uint32_t nrbuf; nxt_buf_t rbuf; @@ -51,6 +54,8 @@ typedef struct { uintptr_t go_request; nxt_go_msg_t *msg_last; + + nxt_port_msg_t port_msg[]; } nxt_go_run_ctx_t; @@ -59,9 +64,6 @@ void nxt_go_ctx_release_msg(nxt_go_run_ctx_t *ctx, nxt_go_msg_t *msg); nxt_int_t nxt_go_ctx_init(nxt_go_run_ctx_t *ctx, nxt_port_msg_t *port_msg, size_t payload_size); -void nxt_go_ctx_add_msg(nxt_go_run_ctx_t *ctx, nxt_port_msg_t *port_msg, - size_t size); - nxt_int_t nxt_go_ctx_flush(nxt_go_run_ctx_t *ctx, int last); nxt_int_t nxt_go_ctx_write(nxt_go_run_ctx_t *ctx, void *data, size_t len); |