Mercurial > hg > nginx
comparison src/event/ngx_event_timer.h @ 6929:3069dd358ba2
Cancelable timers are now preserved if there are other timers.
There is no need to cancel timers early if there are other timers blocking
shutdown anyway. Preserving such timers allows nginx to continue some
periodic work till the shutdown is actually possible.
With the new approach, timers with ev->cancelable are simply ignored when
checking if there are any timers left during shutdown.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 07 Mar 2017 18:51:15 +0300 |
parents | 3efdd7788bb0 |
children |
comparison
equal
deleted
inserted
replaced
6928:e0cc454aafe4 | 6929:3069dd358ba2 |
---|---|
20 | 20 |
21 | 21 |
22 ngx_int_t ngx_event_timer_init(ngx_log_t *log); | 22 ngx_int_t ngx_event_timer_init(ngx_log_t *log); |
23 ngx_msec_t ngx_event_find_timer(void); | 23 ngx_msec_t ngx_event_find_timer(void); |
24 void ngx_event_expire_timers(void); | 24 void ngx_event_expire_timers(void); |
25 void ngx_event_cancel_timers(void); | 25 ngx_int_t ngx_event_no_timers_left(void); |
26 | 26 |
27 | 27 |
28 extern ngx_rbtree_t ngx_event_timer_rbtree; | 28 extern ngx_rbtree_t ngx_event_timer_rbtree; |
29 | 29 |
30 | 30 |