make api server use only a single thread
This commit is contained in:
parent
c1cbde82a1
commit
2c08f29691
1 changed files with 3 additions and 0 deletions
|
@ -2,6 +2,9 @@ set(TARGET server)
|
|||
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_executable(${TARGET} server.cpp json.hpp httplib.h)
|
||||
target_compile_definitions(${TARGET} PRIVATE
|
||||
# single thread
|
||||
CPPHTTPLIB_THREAD_POOL_COUNT=1
|
||||
# crash the server in the debug mode, otherwise send http 500 error
|
||||
$<$<CONFIG:Debug>:
|
||||
CPPHTTPLIB_NO_EXCEPTIONS=1
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue