Commit c91129db authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

Temporarily remove onError returning a future that completes on the original...

Temporarily remove onError returning a future that completes on the original executor due to production issues.

Summary: https://fb.facebook.com/groups/fbcode.investigations/permalink/407299856363159/ showed issues coming from this diff. The change to return an executor-tied future from onError was intentional, and correct behaviour, but it was a change that seems to have caused issues. Temporarily removing it to rethink how we should approach it.

Reviewed By: andriigrynenko

Differential Revision: D7219231

fbshipit-source-id: 95b91f3a5ea7d854d5df052e6cd5851c7e6fbdab
parent 9f6ec59f
......@@ -875,8 +875,8 @@ Future<T>::onError(F&& func) {
// Allow for applying to future with null executor while this is still
// possible.
auto* e = this->getExecutor();
return std::move(sf).via(e ? e : &folly::InlineExecutor::instance());
// TODO(T26801487): Should have an executor
return std::move(sf).via(&folly::InlineExecutor::instance());
}
// onError where the callback returns Future<T>
......@@ -918,8 +918,8 @@ Future<T>::onError(F&& func) {
// Allow for applying to future with null executor while this is still
// possible.
auto* e = this->getExecutor();
return std::move(sf).via(e ? e : &folly::InlineExecutor::instance());
// TODO(T26801487): Should have an executor
return std::move(sf).via(&folly::InlineExecutor::instance());
}
template <class T>
......@@ -971,8 +971,8 @@ Future<T>::onError(F&& func) {
// Allow for applying to future with null executor while this is still
// possible.
auto* e = this->getExecutor();
return std::move(sf).via(e ? e : &folly::InlineExecutor::instance());
// TODO(T26801487): Should have an executor
return std::move(sf).via(&folly::InlineExecutor::instance());
}
// onError(exception_wrapper) that returns T
......@@ -1003,8 +1003,8 @@ Future<T>::onError(F&& func) {
// Allow for applying to future with null executor while this is still
// possible.
auto* e = this->getExecutor();
return std::move(sf).via(e ? e : &folly::InlineExecutor::instance());
// TODO(T26801487): Should have an executor
return std::move(sf).via(&folly::InlineExecutor::instance());
}
template <class Func>
......
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