summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-12-27 17:47:18 +0300
committerMax Romanov <max.romanov@nginx.com>2017-12-27 17:47:18 +0300
commitbef2ec483eaa525da770c024069b31320b63977e (patch)
treea0e89da5619533e84a045ae357b9fb44cb250c30 /src/nxt_port.h
parentab138c91661aa9b3ba36fb9a1a2154461a1e2372 (diff)
downloadunit-bef2ec483eaa525da770c024069b31320b63977e.tar.gz
unit-bef2ec483eaa525da770c024069b31320b63977e.tar.bz2
Fixing application timeout.
Application timeout limits maximum time of worker response in processing particular request. Not including the time required to start worker, time in request queue etc.
Diffstat (limited to 'src/nxt_port.h')
-rw-r--r--src/nxt_port.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h
index cf30bc92..74d37dcb 100644
--- a/src/nxt_port.h
+++ b/src/nxt_port.h
@@ -168,6 +168,7 @@ struct nxt_port_s {
uint32_t app_pending_responses;
uint32_t app_responses;
+ nxt_queue_t pending_requests;
nxt_port_handler_t handler;
nxt_port_handler_t *data;
@@ -265,4 +266,9 @@ nxt_int_t nxt_port_post(nxt_task_t *task, nxt_port_t *port,
nxt_port_post_handler_t handler, void *data);
void nxt_port_use(nxt_task_t *task, nxt_port_t *port, int i);
+nxt_inline void nxt_port_inc_use(nxt_port_t *port)
+{
+ nxt_atomic_fetch_add(&port->use_count, 1);
+}
+
#endif /* _NXT_PORT_H_INCLUDED_ */