Fix a corner case in lv2_timer_thread abort

This commit is contained in:
Eladash 2023-12-31 20:46:30 +02:00 committed by Elad Ashkenazi
parent 89b8be98d6
commit f5d39ef7f2
1 changed files with 5 additions and 0 deletions

View File

@ -149,6 +149,11 @@ void lv2_timer_thread::operator()()
{ {
while (lv2_obj::check(timer)) while (lv2_obj::check(timer))
{ {
if (thread_ctrl::state() == thread_state::aborting)
{
break;
}
if (const u64 advised_sleep_time = timer->check(_now)) if (const u64 advised_sleep_time = timer->check(_now))
{ {
if (sleep_time > advised_sleep_time) if (sleep_time > advised_sleep_time)