Fixed thread pools and app destructor

This commit is contained in:
WSAL Evan
2025-12-03 10:03:44 -05:00
parent e5a4e57dbc
commit b3b596c4b6
2 changed files with 5 additions and 3 deletions
+3
View File
@@ -9,6 +9,9 @@ namespace WillowVox
class App
{
public:
App() = default;
virtual ~App() = default;
void Run();
virtual void Start() {}
+2 -3
View File
@@ -43,8 +43,7 @@ namespace WillowVox
{
// Wait for job to be enqueued
m_signal.wait_dequeue(token);
Logger::Log("Worker thread %d checking for jobs", std::this_thread::get_id());
// Stop early if necessary
if (m_shouldTerminate)
return;
@@ -55,7 +54,7 @@ namespace WillowVox
for (int i = 0; i < static_cast<int>(Priority::Count); i++)
{
if (m_queues[static_cast<int>(Priority::High)].try_dequeue(job))
if (m_queues[i].try_dequeue(job))
{
found = true;
break;