Add collectAnyNoDiscard()
Summary: D28945040 added `collectAny()` which early-returns when any of the SemiAwaitables produces a value (or exception). There's the potential for discarded results, however - multiple SemiAwaitables can produce results depending on whether they're at a cancellation point and when cancellation is signaled. This diff adds a variant `collectAnyNoDiscard()` that signals cancellation when any SemiAwaitable finishes and returns *all* results that completed. It produces a tuple of optional values from the SemiAwaitables (or `std::nullopt` if it was canceled). Reviewed By: iahs Differential Revision: D29240725 fbshipit-source-id: 3e664339e8692cbb9114138a96345cf9f9d5cb0b
Showing
Please register or sign in to comment