File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.26 )
2+
3+ project (thread.pool)
4+
5+ set (CMAKE_CXX_STANDARD 23)
6+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
7+
8+ set (SOURCES
9+ main.cpp
10+ )
11+
12+ find_package (Boost 1.81 REQUIRED thread )
13+
14+ include_directories (
15+ /usr/local/include
16+ /opt/homebrew/include
17+ ${CMAKE_CURRENT_SOURCE_DIR}
18+ )
19+
20+ link_directories (
21+ /usr/local/lib
22+ /opt/homebrew/lib
23+ )
24+
25+ add_executable (thread.pool ${SOURCES} )
26+
27+ target_link_libraries (thread.pool
28+
29+ Boost::thread
30+ )
31+
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ int main()
2626 });
2727
2828 // Pause the main thread before cancelling the jthread
29- this_thread::sleep_for (5s );
29+ this_thread::sleep_for (3s );
3030
3131 // request for our jthread to stop
3232 jt0.request_stop ();
You can’t perform that action at this time.
0 commit comments