Add clarifying comment to cancellation handling in rendezvous.cc.
PiperOrigin-RevId: 266939120
This commit is contained in:
parent
993bf65062
commit
3904672376
@ -266,6 +266,9 @@ class LocalRendezvousImpl : public Rendezvous {
|
||||
Item* item = new Item;
|
||||
|
||||
if (cm != nullptr) {
|
||||
// NOTE(mrry): We must wrap `done` with code that deregisters the
|
||||
// cancellation callback before calling the `done` callback, because the
|
||||
// cancellation manager may no longer be live after `done` is called.
|
||||
auto wrapped_done = std::bind(
|
||||
[cm, token](const DoneCallback& done,
|
||||
// Begin unbound arguments.
|
||||
|
Loading…
Reference in New Issue
Block a user