pull/36732/head
Craig Tiller 11 months ago
parent 7264f4fe92
commit 4c09d88788
  1. 5
      src/core/lib/promise/party.h

@ -379,6 +379,11 @@ class Party : public Activity, private Wakeable {
// The on_complete callback will be called with the result of the promise if
// it completes.
// A maximum of sixteen promises can be spawned onto a party.
// promise_factory called to create the promise with the party lock taken;
// after the promise is created the factory is destroyed.
// This means that pointers or references to factory members will be
// invalidated after the promise is created - so the promise should not retain
// any of these.
template <typename Factory, typename OnComplete>
void Spawn(absl::string_view name, Factory promise_factory,
OnComplete on_complete);

Loading…
Cancel
Save