Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uloop_run_events was not awakened when the first timeout was added. #11

Open
trnny opened this issue Jan 27, 2024 · 0 comments
Open

uloop_run_events was not awakened when the first timeout was added. #11

trnny opened this issue Jan 27, 2024 · 0 comments

Comments

@trnny
Copy link

trnny commented Jan 27, 2024

libubox/uloop.c

Lines 667 to 678 in c1be505

uloop_process_timeouts();
if (do_sigchld)
uloop_handle_processes();
if (uloop_cancelled)
break;
next_time = uloop_get_next_timeout();
if (timeout >= 0 && (next_time < 0 || timeout < next_time))
next_time = timeout;
uloop_run_events(next_time);

consider the following case:
uloop_run_events (-1) was entered when there is no next_timeout
and then executing uloop_timeout_add to add a timeout "task" that will not wake up uloop_run_events
the timeout "task" will never be executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant