A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../atomic/../thread/jthread/get_stop_source.html below:

std::jthread::get_stop_source - cppreference.com

Returns a std::stop_source associated with the same shared stop-state as held internally by the jthread object.

[edit] Parameters

(none)

[edit] Return value

A value of type std::stop_source associated with stop-state held internally by jthread object.

[edit] Example

Possible output:

stop_source: stop_possible = true, stop_requested = false
 
Pass source to other thread:
  Sleepy worker goes back to sleep
Request stop for worker via source
  Sleepy worker is requested to stop
 
stop_source: stop_possible = true, stop_requested = true

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4