-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
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>();
- duplicates
-
SERVER-35234 makePromiseFuture<T>() to create a bound Promise and Future
- Closed