uloop: allow timeouts to cancel the event loop
This commit is contained in:
parent
7ec33884a3
commit
83037e345d
1 changed files with 2 additions and 0 deletions
2
uloop.c
2
uloop.c
|
@ -383,6 +383,8 @@ void uloop_run(void)
|
||||||
{
|
{
|
||||||
gettimeofday(&tv, NULL);
|
gettimeofday(&tv, NULL);
|
||||||
uloop_process_timeouts(&tv);
|
uloop_process_timeouts(&tv);
|
||||||
|
if (uloop_cancelled)
|
||||||
|
break;
|
||||||
uloop_run_events(uloop_get_next_timeout(&tv));
|
uloop_run_events(uloop_get_next_timeout(&tv));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue