summaryrefslogtreecommitdiff
path: root/src/mongo/transport/baton.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-10-31 15:42:17 -0400
committerMathias Stearn <mathias@10gen.com>2018-11-15 17:25:11 -0500
commit3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0 (patch)
tree2bd06655367af012e17bf80947cdb792fa1b9b44 /src/mongo/transport/baton.h
parent1ded7067e2d1a6161b15e5a462f8cba2d755c9a6 (diff)
downloadmongo-3d7ed4fdd5e4840e9599a74ec92e16bc619bebf0.tar.gz
SERVER-35682 kill existing SharedPromise type
This required plumbing unique_function into many more places.
Diffstat (limited to 'src/mongo/transport/baton.h')
-rw-r--r--src/mongo/transport/baton.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/transport/baton.h b/src/mongo/transport/baton.h
index 6440b7d4e39..9dbf570ede2 100644
--- a/src/mongo/transport/baton.h
+++ b/src/mongo/transport/baton.h
@@ -75,8 +75,8 @@ public:
Future<FutureContinuationResult<Callback>> execute(Callback&& cb) {
auto pf = makePromiseFuture<FutureContinuationResult<Callback>>();
- schedule([ cb = std::forward<Callback>(cb), sp = pf.promise.share() ]() mutable {
- sp.setWith(std::move(cb));
+ schedule([ cb = std::forward<Callback>(cb), p = std::move(pf.promise) ]() mutable {
+ p.setWith(std::move(cb));
});
return std::move(pf.future);