50 lines
1.4 KiB
Markdown
50 lines
1.4 KiB
Markdown
[stopsource.inplace.mem]
|
||
|
||
# 32 Concurrency support library [[thread]](./#thread)
|
||
|
||
## 32.3 Stop tokens [[thread.stoptoken]](thread.stoptoken#stopsource.inplace.mem)
|
||
|
||
### 32.3.9 Class inplace_stop_source [[stopsource.inplace]](stopsource.inplace#mem)
|
||
|
||
#### 32.3.9.3 Member functions [stopsource.inplace.mem]
|
||
|
||
[ð](#itemdecl:1)
|
||
|
||
`constexpr inplace_stop_token get_token() const noexcept;
|
||
`
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1289)
|
||
|
||
*Returns*: A new associated inplace_stop_token object
|
||
whose *stop-source* member is equal to this[.](#1.sentence-1)
|
||
|
||
[ð](#itemdecl:2)
|
||
|
||
`bool stop_requested() const noexcept;
|
||
`
|
||
|
||
[2](#2)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1300)
|
||
|
||
*Returns*: true if the stop state inside *this has received a stop request; otherwise, false[.](#2.sentence-1)
|
||
|
||
[ð](#itemdecl:3)
|
||
|
||
`bool request_stop() noexcept;
|
||
`
|
||
|
||
[3](#3)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1311)
|
||
|
||
*Effects*: Executes a stop request operation ([[stoptoken.concepts]](stoptoken.concepts "32.3.3 Stop token concepts"))[.](#3.sentence-1)
|
||
|
||
[4](#4)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1315)
|
||
|
||
*Postconditions*: stop_requested() is true[.](#4.sentence-1)
|