Details
-
New Feature
-
Status: Closed
-
Major - P3
-
Resolution: Duplicate
-
None
-
None
Description
It would be helpful to have a utility which produced promises and futures in one atomic operation, because actually extracting a future from a promise is a racy operation (for multiple threads extracting the future, and for extracting the future and fulfilling the promise).
It should probably look something like:
auto [promise, future] = makePromiseFuturePair<T>();
|
Attachments
Issue Links
- duplicates
-
SERVER-35234 makePromiseFuture<T>() to create a bound Promise and Future
-
- Closed
-