[SERVER-49702] Add way to explicitly copy a SharedSemiFuture, forking the continuation chain Created: 17/Jul/20  Updated: 29/Oct/23  Resolved: 27/Jul/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.7.0

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-49535 Allow startNewInstance to join with e... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2020-07-27, Service Arch 2020-08-10
Participants:

 Description   

SharedPromise/SharedSemiFuture allow introducing a "tee" into a future resolution chain, allowing the completion of 1 promise to result in multiple futures resolving (this of course requires that the value being provided to the futures be copyable). In order to get multiple SharedSemiFutures linked to one SharedPromise, however, you either need to generate the SharedSemiFutures off the original SharedPromise directly, or call thenRunOn() with an executor for follow-up work.

We should add a convenience method to take a given SharedSemiFuture and produce a new SharedSemiFuture that resolves at the same time as the original, without invalidating the original.



 Comments   
Comment by Githook User [ 27/Jul/20 ]

Author:

{'name': 'Spencer T Brody', 'email': 'spencer@mongodb.com', 'username': 'stbrody'}

Message: SERVER-49702 Add way to explicitly fork SharedSemiFuture continuation chain
Branch: master
https://github.com/mongodb/mongo/commit/738a31e2e7bd7c64f154cedbb2f330151be57788

Generated at Thu Feb 08 05:20:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.