Skip to content

Commit

Permalink
Integrate the timers in the thread pool
Browse files Browse the repository at this point in the history
  • Loading branch information
palikar committed Jul 28, 2020
1 parent 5d867f4 commit 0802a85
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/alisp/src/async/asyncs.cpp
Expand Up @@ -124,7 +124,7 @@ void AsyncS::handle_timers()

++it;
}
// spin_loop();
spin_loop();
}

void AsyncS::handle_actions()
Expand Down Expand Up @@ -156,12 +156,11 @@ void AsyncS::event_loop()
AL_BIT_ON(m_flags, RUNNING_FLAG);
while (AL_BIT_CHECK(m_flags, RUNNING_FLAG))
{
event_loop_cv.wait_for(el_lock, 10ms);
event_loop_cv.wait(el_lock);

m_now = Timer::now();

handle_timers();
// m_thread_pool.submit([&]() { handle_timers(); });
m_thread_pool.submit([&]() { handle_timers(); });

if (!AL_BIT_CHECK(m_flags, RUNNING_FLAG))
{
Expand Down

0 comments on commit 0802a85

Please sign in to comment.