Commit 467571e4 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

A shorter name for executor local variable in Future methods

Summary:
[Folly] A shorter name for executor local variable in `Future` methods. Reads more nicely, with less awkward formatting.

When the scope of a local variable's use is just a few lines, long names are not quite so critical.

Reviewed By: marshallcline

Differential Revision: D8339451

fbshipit-source-id: 5d50cf0ce3473c1a79afeeddb9e1257cccf73e31
parent ac16a6fc
......@@ -1736,11 +1736,9 @@ Future<T> Future<T>::within(Duration dur, E e, Timekeeper* tk) {
return std::move(*this);
}
auto* currentExecutor = this->getExecutor();
auto* exe = this->getExecutor();
return this->withinImplementation(dur, e, tk)
.via(
currentExecutor ? currentExecutor
: &InlineExecutor::instance());
.via(exe ? exe : &InlineExecutor::instance());
}
// delayed
......@@ -1787,9 +1785,8 @@ void waitImpl(FutureType& f) {
template <class T>
void convertFuture(SemiFuture<T>&& sf, Future<T>& f) {
// Carry executor from f, inserting an inline executor if it did not have one
auto* currentExecutor = f.getExecutor();
f = std::move(sf).via(
currentExecutor ? currentExecutor : &InlineExecutor::instance());
auto* exe = f.getExecutor();
f = std::move(sf).via(exe ? exe : &InlineExecutor::instance());
}
template <class 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