std::jthread::get_stop_source

< cpp‎ | thread‎ | jthread
std::stop_source get_stop_source() const noexcept;
(C++20 起)

返回 std::stop_source ,拥有与 jthread 对象内部所保有者相同的共享停止状态。

参数

(无)

返回值

std::stop_source 类型值,与 jthread 对象内部保有的共享停止状态关联。

示例