Skip to content

Create new section with receiver contract and lifetimes of sender/receiver #24

Open
@ericniebler

Description

@ericniebler

Issue by ericniebler
Wednesday Feb 15, 2023 at 22:17 GMT
Originally opened as brycelelbach/wg21_p2300_execution#27


Discuss complete life-cycle of an async operation, including the required lifetimes of scheduler, sender, receiver, op state, and queries with relation to each other.

  • The validity of a sender returned by schedule(sched) does not depend on the validity of the scheduler.
  • The validity of an operation state returned by connect(snd, rcv) does not depend on the validity of snd or rcv.
  • An operation state shall not be moved or copied once start() has begun executing.
  • Once start() has begun executing, an operation state shall remain valid until a completion signal operation has begun executing.
  • The destructor of an operation state shall be called synchronously, directly or indirectly, from within the execution of the completion signal operation, or after the completion signal operation has finished executing.
  • A completion signal operation shall not be called before start() has begun executing.
  • The receiver to which a sender is connected shall not be copied or moved after start() is called on the operation state.
  • Once start() has been called on an operation state, exactly one of the completion signal operations shall be called on the receiver used to obtain the operation state, or on a receiver object copy- or move-constructed from said receiver.
  • The queryable result of calling get_env on a sender or a receiver, and the result of calling a query on such a queryable object, shall remain valid while the sender or receiver is valid.
  • The receiver is assumed to be invalid after any expression that, directly or indirectly, causes the destructor of the operation state to be executed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions