[exec.recv.concepts] # 33 Execution control library [[exec]](./#exec) ## 33.7 Receivers [[exec.recv]](exec.recv#concepts) ### 33.7.1 Receiver concepts [exec.recv.concepts] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1173) A receiver represents the continuation of an asynchronous operation[.](#1.sentence-1) The [receiver](#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") concept defines the requirements for a receiver type ([[exec.async.ops]](exec.async.ops "33.3 Asynchronous operations"))[.](#1.sentence-2) The [receiver_of](#concept:receiver_of "33.7.1 Receiver concepts [exec.recv.concepts]") concept defines the requirements for a receiver type that is usable as the first argument of a set of completion operations corresponding to a set of completion signatures[.](#1.sentence-3) The get_env customization point object is used to access a receiver's associated environment[.](#1.sentence-4) namespace std::execution {templateconcept [receiver](#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") =[derived_from](concept.derived#concept:derived_from "18.4.3 Concept derived_­from [concept.derived]")::receiver_concept, receiver_t> &&requires(const remove_cvref_t& rcvr) {{ get_env(rcvr) } -> [*queryable*](exec.queryable.concept#concept:queryable "33.2.2 queryable concept [exec.queryable.concept]"); } &&[move_constructible](concept.moveconstructible#concept:move_constructible "18.4.13 Concept move_­constructible [concept.moveconstructible]")> && // rvalues are movable, and[constructible_from](concept.constructible#concept:constructible_from "18.4.11 Concept constructible_­from [concept.constructible]"), Rcvr>; // lvalues are copyabletemplateconcept [*valid-completion-for*](#concept:valid-completion-for "33.7.1 Receiver concepts [exec.recv.concepts]") = // *exposition only*requires (Signature* sig) {[](Tag(*)(Args...))requires [*callable*](functional.syn#concept:callable "22.10.2 Header synopsis [functional.syn]"), Args...>{}(sig); }; templateconcept [*has-completions*](#concept:has-completions "33.7.1 Receiver concepts [exec.recv.concepts]") = // *exposition only*requires (Completions* completions) {[]<[*valid-completion-for*](#concept:valid-completion-for "33.7.1 Receiver concepts [exec.recv.concepts]")...Sigs>(completion_signatures*){}(completions); }; templateconcept [receiver_of](#concept:receiver_of "33.7.1 Receiver concepts [exec.recv.concepts]") =[receiver](#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") && [*has-completions*](#concept:has-completions "33.7.1 Receiver concepts [exec.recv.concepts]");} [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1215) Class types that are marked final do not model the [receiver](#concept:receiver "33.7.1 Receiver concepts [exec.recv.concepts]") concept[.](#2.sentence-1) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/exec.tex#L1218) Let rcvr be a receiver and let op_state be an operation state associated with an asynchronous operation created by connecting rcvr with a sender[.](#3.sentence-1) Let token be a stop token equal toget_stop_token(get_env(rcvr))[.](#3.sentence-2) token shall remain valid for the duration of the asynchronous operation's lifetime ([[exec.async.ops]](exec.async.ops "33.3 Asynchronous operations"))[.](#3.sentence-3) [*Note [1](#note-1)*: This means that, unless it knows about further guarantees provided by the type of rcvr, the implementation of op_state cannot use token after it executes a completion operation[.](#3.sentence-4) This also implies that any stop callbacks registered on token must be destroyed before the invocation of the completion operation[.](#3.sentence-5) — *end note*]