Commit 6d97401b authored by Lee Howes's avatar Lee Howes Committed by Facebook GitHub Bot

Fix SemiFuture::delayed to not insert an inline executor

Summary: SemiFuture::delayed should pass the SemiFuture all the way through.

Reviewed By: yfeldblum

Differential Revision: D20684503

fbshipit-source-id: e7d1299a177d347cb5b92e9e700c607fc9f7c4c3
parent 38c7c898
......@@ -871,8 +871,7 @@ SemiFuture<Unit> SemiFuture<T>::unit() && {
template <typename T>
SemiFuture<T> SemiFuture<T>::delayed(HighResDuration dur, Timekeeper* tk) && {
return collectAllSemiFuture(*this, futures::sleep(dur, tk))
.toUnsafeFuture()
.thenValue([](std::tuple<Try<T>, Try<Unit>> tup) {
.deferValue([](std::tuple<Try<T>, Try<Unit>> tup) {
Try<T>& t = std::get<0>(tup);
return makeFuture<T>(std::move(t));
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment