[stoptoken.inplace.mem] # 32 Concurrency support library [[thread]](./#thread) ## 32.3 Stop tokens [[thread.stoptoken]](thread.stoptoken#stoptoken.inplace.mem) ### 32.3.8 Class inplace_stop_token [[stoptoken.inplace]](stoptoken.inplace#mem) #### 32.3.8.2 Member functions [stoptoken.inplace.mem] [🔗](#itemdecl:1) `void swap(inplace_stop_token& rhs) noexcept; ` [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1192) *Effects*: Exchanges the values of *stop-source* and rhs.*stop-source*[.](#1.sentence-1) [🔗](#itemdecl:2) `bool stop_requested() const noexcept; ` [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1202) *Effects*: Equivalent to:return *stop-source* != nullptr && *stop-source*->stop_requested(); [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1209) [*Note [1](#note-1)*: As specified in [[basic.life]](basic.life "6.8.4 Lifetime"), the behavior of stop_requested is undefined unless the call strongly happens before the start of the destructor of the associated inplace_stop_source object, if any[.](#3.sentence-1) — *end note*] [🔗](#itemdecl:3) `stop_possible() const noexcept; ` [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1223) *Returns*: *stop-source* != nullptr[.](#4.sentence-1) [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/threads.tex#L1227) [*Note [2](#note-2)*: As specified in [[basic.stc.general]](basic.stc.general "6.8.6.1 General"), the behavior of stop_possible is implementation-defined unless the call strongly happens before the end of the storage duration of the associated inplace_stop_source object, if any[.](#5.sentence-1) — *end note*]