Skip to content

Commit 5982b5c

Browse files
committed
1 parent eb1fe5b commit 5982b5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

httplib.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050

5151
#ifndef CPPHTTPLIB_THREAD_POOL_COUNT
5252
#define CPPHTTPLIB_THREAD_POOL_COUNT \
53-
((std::max)(8u, std::thread::hardware_concurrency() - 1))
53+
((std::max)(8u, std::thread::hardware_concurrency() > 0 \
54+
? std::thread::hardware_concurrency() - 1 \
55+
: 0))
5456
#endif
5557

5658
/*

0 commit comments

Comments
 (0)