Skip to content

Commit 87dd5ab

Browse files
committed
Fix #2023
1 parent 0b2e9d0 commit 87dd5ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/base/JobSystem.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ static int clampThreads(int nThreads)
110110
if (nThreads <= 0)
111111
{
112112
#if !defined(__EMSCRIPTEN__) || defined(__EMSCRIPTEN_PTHREADS__)
113-
# if !defined(__EMSCRIPTEN__)
113+
# if defined(AX_PLATFORM_PC)
114114
nThreads = (std::max)(static_cast<int>(std::thread::hardware_concurrency() * 3 / 2), 2);
115115
# else
116-
nThreads = (std::clamp)(static_cast<int>(std::thread::hardware_concurrency()), 2, 8);
116+
nThreads = (std::clamp)(static_cast<int>(std::thread::hardware_concurrency()) - 2, 2, 8);
117117
# endif
118118
#else
119119
AXLOGW("The emscripten pthread not enabled, JobSystem not working");

0 commit comments

Comments
 (0)