std::stop_token1 [C++] std::jthread std::thread 사용시 - 반드시 join 또는 detach 해야한다. std::jthread - C++20 에서 추가된 새로운 스레드 클래스 - - 소멸자에서 join을 해준다.#include #inlcude #include using namespace std::literals;void foo(int a, double b) { std::cout jthread에서 stop token 예제#include #include #include using namespace std::literals;void foo() { for (int i = 0 ; i 2025. 1. 6. 이전 1 다음