Skip to content

Commit

Permalink
[EventEngine] Update Cancel contract on closure deletion timeline (gr…
Browse files Browse the repository at this point in the history
  • Loading branch information
drfloob authored Aug 25, 2023
1 parent 554788a commit aaf6c34
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions include/grpc/event_engine/event_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class EventEngine : public std::enable_shared_from_this<EventEngine> {
///
/// If the associated connection has not been completed, it will be cancelled,
/// and this method will return true. The \a OnConnectCallback will not be
/// called.
/// called, and \a on_connect will be destroyed before this method returns.
virtual bool CancelConnect(ConnectionHandle handle) = 0;
/// Provides asynchronous resolution.
///
Expand Down Expand Up @@ -457,13 +457,9 @@ class EventEngine : public std::enable_shared_from_this<EventEngine> {
/// be cancelled, and this function will return false.
///
/// If the associated closure has not been scheduled to run, it will be
/// cancelled, and the associated absl::AnyInvocable or \a Closure* will not
/// be executed. In this case, Cancel will return true.
///
/// Implementation note: closures should be destroyed in a timely manner after
/// execution or cancellation (milliseconds), since any state bound to the
/// closure may need to be destroyed for things to progress (e.g., if a
/// closure holds a ref to some ref-counted object).
/// cancelled, and this method will return true. The associated
/// absl::AnyInvocable or \a Closure* will not be called. If the closure type
/// was an absl::AnyInvocable, it will be destroyed before the method returns.
virtual bool Cancel(TaskHandle handle) = 0;
};

Expand Down

0 comments on commit aaf6c34

Please sign in to comment.