Klaus Demo nginx / 8f6958b
Win32: fixed cpu hog by cache manager on exit (ticket #514). The "ngx_quit" may be reset by the worker thread before it's seen by a ngx_cache_manager_thread(), resulting in an infinite loop. Make sure to test ngx_exiting as well. Maxim Dounin 8 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
925925 * ev == WAIT_ABANDONED_0 + 1
926926 */
927927
928 if (ngx_terminate || ngx_quit) {
928 if (ngx_terminate || ngx_quit || ngx_exiting) {
929929 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
930930 return 0;
931931 }
935935
936936 for ( ;; ) {
937937
938 if (ngx_terminate || ngx_quit) {
938 if (ngx_terminate || ngx_quit || ngx_exiting) {
939939 ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
940940 break;
941941 }
10041004 path = cycle->paths.elts;
10051005 for (i = 0; i < cycle->paths.nelts; i++) {
10061006
1007 if (ngx_terminate || ngx_quit) {
1007 if (ngx_terminate || ngx_quit || ngx_exiting) {
10081008 break;
10091009 }
10101010