[stopcallback.inplace.cons] (original) (raw)

32 Concurrency support library [thread]

32.3 Stop tokens [thread.stoptoken]

32.3.10 Class template inplace_stop_callback [stopcallback.inplace]

32.3.10.2 Constructors and destructor [stopcallback.inplace.cons]

๐Ÿ”—

template<class Initializer> explicit inplace_stop_callback(inplace_stop_token st, Initializer&& init) noexcept(is_nothrow_constructible_v<CallbackFn, Initializer>);

1

#

Constraints: constructible_from<CallbackFn, Initializer> is satisfied.

2

#

Effects: Initializes callback-fn with stdโ€‹::โ€‹forward<Initializer>(init)and executes a stoppable callback registration ([stoptoken.concepts]).

๐Ÿ”—

~inplace_stop_callback();

3

#

Effects: Executes a stoppable callback deregistration ([stoptoken.concepts]).