13 Asynchronous model [async]

13.2 Requirements [async.reqmts]

13.2.7 Requirements on asynchronous operations [async.reqmts.async]

13.2.7.14 Composed asynchronous operations [async.reqmts.async.composed]

In this document, a composed asynchronous operation is an asynchronous operation that is implemented in terms of zero or more intermediate calls to other asynchronous operations. The intermediate asynchronous operations are performed sequentially. [ Note: That is, the completion handler of an intermediate operation initiates the next operation in the sequence.  — end note ]

An intermediate operation's completion handler shall have an associated executor that is either:

  • the type Executor2 and object ex2 obtained from the completion handler type CompletionHandler and object completion_handler; or

  • an object of an unspecified type satisfying the Executor requirements ([async.reqmts.executor]), that delegates executor operations to the type Executor2 and object ex2.

An intermediate operation's completion handler shall have an associated allocator that is either:

  • the type Alloc2 and object alloc2 obtained from the completion handler type CompletionHandler and object completion_handler; or

  • an object of an unspecified type satisfying the ProtoAllocator requirements ([async.reqmts.proto.allocator]), that delegates allocator operations to the type Alloc2 and object alloc2.