History log of /libuv/src/timer.c (Results 1 – 9 of 9)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# bb6fbcf6 07-Feb-2024 Santiago Gimeno

unix,win: reset the timer queue on stop (#4304)

As there were instances where this didn't happen and could cause memory
corruption issues.

Refs: https://github.com/libuv/libuv/i

unix,win: reset the timer queue on stop (#4304)

As there were instances where this didn't happen and could cause memory
corruption issues.

Refs: https://github.com/libuv/libuv/issues/4248

show more ...


# 51a22f60 22-Dec-2023 Matheus Izvekov

unix,win: fix busy loop with zero timeout timers (#4250)

Calling `uv_timer_start(h, cb, 0, 0)` from a timer callback resulted in
the timer running immediately because it was inserted at

unix,win: fix busy loop with zero timeout timers (#4250)

Calling `uv_timer_start(h, cb, 0, 0)` from a timer callback resulted in
the timer running immediately because it was inserted at the front of
the timer heap.

If the callback did that every time, libuv would effectively busy-loop
in `uv__run_timers()` and never make forward progress.

Work around that by collecting all expired timers into a queue and only
running their callback afterwards.

Fixes: https://github.com/libuv/libuv/issues/4245
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>

show more ...


Revision tags: v1.41.0
# fc2c1a23 18-Nov-2020 Ben Noordhuis

unix,win: initialize timer `timeout` field

With the addition of `uv_timer_get_due_in()` it's observable with tools like
valgrind that the `timer->timeout` field isn't initialized until t

unix,win: initialize timer `timeout` field

With the addition of `uv_timer_get_due_in()` it's observable with tools like
valgrind that the `timer->timeout` field isn't initialized until the timer
is started.

Fixes the following valgrind warning when running the `timer_init` test:

==325215== Conditional jump or move depends on uninitialised value(s)
==325215== at 0x1B0131: uv_timer_get_due_in (timer.c:134)
==325215== by 0x19AF09: run_test_timer_init (test-timer.c:164)
==325215== by 0x119FF1: run_test_part (runner.c:376)
==325215== by 0x11875D: main (run-tests.c:68)
==325215==
==325215== Conditional jump or move depends on uninitialised value(s)
==325215== at 0x19AF1F: run_test_timer_init (test-timer.c:164)
==325215== by 0x119FF1: run_test_part (runner.c:376)
==325215== by 0x11875D: main (run-tests.c:68)

Fixes: https://github.com/libuv/libuv/issues/3020
PR-URL: https://github.com/libuv/libuv/pull/3038
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>

show more ...

Revision tags: v1.40.0, v1.39.0, v1.38.1, v1.38.0, v1.37.0, v1.36.0, v1.35.0, v1.34.2, v1.34.1, v1.34.0, v1.33.1, v1.33.0, v1.32.0, v1.31.0, v1.30.1, v1.30.0, v1.29.1, v1.29.0, v1.28.0, v1.27.0, v1.26.0, v1.25.0, v1.24.1, v1.24.0, v1.23.2, v1.23.1, v1.23.0, v1.22.0, v1.21.0, v1.20.3, v1.20.2, v1.20.1, v1.20.0, v1.19.2, v1.19.1, v1.19.0, v1.18.0, v1.17.0, v1.16.1, v1.16.0, v1.15.0, v1.14.1, v1.14.0, v1.13.1, v1.13.0, v1.12.0
# 2a1b880f 16-Mar-2017 Ulrik Strid

unix,win: add uv_timer_get_due_in()

Co-authored-by: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Refs: https://github.com/nodejs/node-report/pull/73
Refs: https://github.com/libuv/

unix,win: add uv_timer_get_due_in()

Co-authored-by: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Refs: https://github.com/nodejs/node-report/pull/73
Refs: https://github.com/libuv/libuv/pull/1255
Fixes: https://github.com/libuv/libuv/issues/2950
PR-URL: https://github.com/libuv/libuv/pull/2951
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

show more ...

# 0fd99319 16-Apr-2020 Yash Ladha

timer: remove redundant check in heap compare

`timer_less_than()` function is basically a comparator function
that returns true or false. In the end of the function we were
checking

timer: remove redundant check in heap compare

`timer_less_than()` function is basically a comparator function
that returns true or false. In the end of the function we were
checking for the comparison of id, but the later if is redundant
as we are anyways in the end are returning `0`. That extra check
can thus be safely removed.

PR-URL: https://github.com/libuv/libuv/pull/2785
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# 92808aea 19-Feb-2020 TK-one

src: fix wrong method name in comment

PR-URL: https://github.com/libuv/libuv/pull/2689
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.co

src: fix wrong method name in comment

PR-URL: https://github.com/libuv/libuv/pull/2689
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>

show more ...

# 2ee2d462 13-Aug-2019 seny

timer: fix uv_timer_start on closing timer

Return `UV_EINVAL` in this case.

Fixes: https://github.com/libuv/libuv/issues/2416
PR-URL: https://github.com/libuv/libuv/pull/2424

timer: fix uv_timer_start on closing timer

Return `UV_EINVAL` in this case.

Fixes: https://github.com/libuv/libuv/issues/2416
PR-URL: https://github.com/libuv/libuv/pull/2424
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...

# c5593b51 05-Nov-2018 Jameson Nash

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack

warnings: fix code that emits compiler warnings

PR-URL: https://github.com/libuv/libuv/pull/2066
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>

show more ...

# 95c5bf8d 14-Jun-2018 Ben Noordhuis

unix,win: merge timers implementation

Merge src/unix/timer.c and src/win/timer.c into src/timer.c. This
changes the Windows implementation from a binary tree to a binary
heap for ge

unix,win: merge timers implementation

Merge src/unix/timer.c and src/win/timer.c into src/timer.c. This
changes the Windows implementation from a binary tree to a binary
heap for generally better performance.

PR-URL: https://github.com/libuv/libuv/pull/1882
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

show more ...