mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 17:28:29 +00:00
Fix #351
This commit is contained in:
parent
ca5a50d2c9
commit
464cc89b77
1 changed files with 2 additions and 7 deletions
|
@ -41,7 +41,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_PAYLOAD_MAX_LENGTH
|
#ifndef CPPHTTPLIB_PAYLOAD_MAX_LENGTH
|
||||||
#define CPPHTTPLIB_PAYLOAD_MAX_LENGTH (std::numeric_limits<size_t>::max)()
|
#define CPPHTTPLIB_PAYLOAD_MAX_LENGTH (std::numeric_limits<size_t>::max())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_RECV_BUFSIZ
|
#ifndef CPPHTTPLIB_RECV_BUFSIZ
|
||||||
|
@ -49,12 +49,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CPPHTTPLIB_THREAD_POOL_COUNT
|
#ifndef CPPHTTPLIB_THREAD_POOL_COUNT
|
||||||
// if hardware_concurrency() outputs 0 we still wants to use threads for this.
|
#define CPPHTTPLIB_THREAD_POOL_COUNT (std::max(1u, std::thread::hardware_concurrency() - 1))
|
||||||
// -1 because we have one thread already in the main function.
|
|
||||||
#define CPPHTTPLIB_THREAD_POOL_COUNT \
|
|
||||||
(std::thread::hardware_concurrency() \
|
|
||||||
? std::thread::hardware_concurrency() - 1 \
|
|
||||||
: 2)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue