From efdfb312a630acef8c026944dc902e68cbac5b89 Mon Sep 17 00:00:00 2001 From: Gabriel Sibley Date: Wed, 22 Mar 2023 11:45:40 -0300 Subject: [PATCH] Do not create worker with no ThreadLocal storage --- source/xatlas/xatlas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/xatlas/xatlas.cpp b/source/xatlas/xatlas.cpp index 5c5c57e..cf6626f 100644 --- a/source/xatlas/xatlas.cpp +++ b/source/xatlas/xatlas.cpp @@ -3139,7 +3139,7 @@ class TaskScheduler m_groups[i].ref = 0; m_groups[i].userData = nullptr; } - m_workers.resize(std::thread::hardware_concurrency() <= 1 ? 1 : std::thread::hardware_concurrency() - 1); + m_workers.resize(std::thread::hardware_concurrency() <= 1 ? 0 : std::thread::hardware_concurrency() - 1); for (uint32_t i = 0; i < m_workers.size(); i++) { new (&m_workers[i]) Worker(); m_workers[i].wakeup = false;