Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crnlib/crn_threading_pthreads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ void crn_threading_init() {
#else
g_number_of_processors = 1;
#endif
g_number_of_processors = math::minimum<int>(g_number_of_processors, task_pool::cMaxThreads);
}

crn_thread_id_t crn_get_current_thread_id() {
Expand Down
1 change: 1 addition & 0 deletions crnlib/crn_threading_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void crn_threading_init() {
GetSystemInfo(&g_system_info);

g_number_of_processors = math::maximum<uint>(1U, g_system_info.dwNumberOfProcessors);
g_number_of_processors = math::minimum<int>(g_number_of_processors, task_pool::cMaxThreads);
}

crn_thread_id_t crn_get_current_thread_id() {
Expand Down