[SERVER-35027] Add makePromiseFuturePair() helper to util/future.h Created: 16/May/18 Updated: 28/May/19 Resolved: 28/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Mira Carey | Assignee: | DO NOT USE - Backlog - Platform Team |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | service_architecture_continuous_delivery | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| 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:
|