|
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.
libubox/uloop.c
Lines 667 to 678 in c1be505
consider the following case:
uloop_run_events (-1)was entered when there is nonext_timeoutand then executing
uloop_timeout_addto add a timeout "task" that will not wake upuloop_run_eventsthe timeout "task" will never be executed.