#include #include #include #include #include #include #include"../header/CThreadPool.hpp" namespace { std::mutex mut; size_t get() { using namespace std; static mt19937 mu{static_cast(chrono::high_resolution_clock::now().time_since_epoch().count())}; return mu()%4; } std::size_t add_func(const std::size_t i) { using namespace std; const auto sec{get()}; this_thread::sleep_for(chrono::seconds{sec}); lock_guard lock{mut}; cout<<"add - thread "< lock{mut}; cout<<"add_and_detach - thread "< que; cout<<"stage 1"<