What "internal_fields" variable stand for?

36 views
Skip to first unread message

Dan Nahari

unread,
Oct 27, 2021, 10:14:38 AM10/27/21
to libuv
Hi all,

libuv docs explain how timeout is calculated.
In the code, the timeout is calculated by uv_backend_timeout function and then we are  passing this value to uv__io_poll function.

for example "If there are any idle handles active, the timeout is 0."
but there is one case I didn't understand and maybe you can assist me,
inside uv__io_poll function (at epoll.c file) there is one condition that will override timeout we receive:
"if (uv__get_internal_fields(loop)->flags & UV_METRICS_IDLE_TIME) {
  ...
  timeout = 0; "

what internal_fields variable stand for? what are the cases it will be set?

Thank you,

Dan

Reply all
Reply to author
Forward
0 new messages