Welcome! Log In Create A New Profile

Advanced

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev)

Valentin V. Bartenev
November 07, 2017 10:04AM
On Tuesday, 7 November 2017 14:36:47 MSK yang chen wrote:
> Thank you very much, but there is another question, if delta larger than
> 1ms, it will invole the ngx_event_expire_timers, why not 2ms or others? how
> do you get the value?
> if there are much events comming for 30s, and epoll_wait return quickly
> (linux) which less than 1ms in each circle,
> and the ngx_event_expire_timers will not be excecuted for 30s?
>

ngx_event_expire_timers() doesn't care about delta at all. It uses absolute
time and all timers have an absolute time when they have to be triggered.
The function triggers all the timers with absolute time less or equal than
the current time. This delta check is just an optimization.

I suggest you to read the code of the function. It's hard to understand the
logic, if you read only the part of it and don't have the whole picture in
the mind.

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev)

yang chen November 07, 2017 06:38AM

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev)

Valentin V. Bartenev November 07, 2017 10:04AM

Re: why delta only include the execution time of ngx_process_events not ngx_event_process_posted (Zhang Chao) (Valentin V. Bartenev)

Valentin V. Bartenev November 07, 2017 10:22AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready