SyntaxFix
Write A Post
Hire A Developer
Questions
This simple mechanism you can use for detecting finishing of a thread without blocking in join method.
std::thread thread([&thread]() { sleep(3); thread.detach(); }); while(thread.joinable()) sleep(1);