proxygen
|
Namespaces | |
detail_msvc_15_7_workaround | |
Classes | |
struct | argResult |
struct | ArgType |
struct | ArgType< Arg, Args... > |
struct | ArgType<> |
struct | callableResult |
class | Core |
class | CoreCallbackState |
class | DeferredExecutor |
struct | EmptyConstruct |
struct | Extract |
struct | Extract< R(&)(Args...)> |
struct | Extract< R(*)(Args...)> |
struct | Extract< R(Class::*)(Args...) const > |
struct | Extract< R(Class::*)(Args...)> |
class | FutureBase |
struct | retrying_policy_fut_tag |
struct | retrying_policy_raw_tag |
struct | retrying_policy_traits |
struct | SpinLock |
SpinLock is and must stay a 1-byte object because of how Core is laid out. More... | |
struct | tryCallableResult |
struct | TryEquals |
struct | valueCallableResult |
class | WaitExecutor |
struct | WindowFakeVector |
Typedefs | |
typedef folly::fibers::Baton | FutureBatonType |
Enumerations | |
enum | State : uint8_t { State::Start = 1 << 0, State::OnlyResult = 1 << 1, State::OnlyCallback = 1 << 2, State::Proxy = 1 << 3, State::Done = 1 << 4, State::Empty = 1 << 5 } |
See Core for details. More... | |
Functions | |
constexpr State | operator& (State a, State b) |
constexpr State | operator| (State a, State b) |
constexpr State | operator^ (State a, State b) |
constexpr State | operator~ (State a) |
template<typename T , typename F > | |
auto | makeCoreCallbackState (Promise< T > &&p, F &&f) noexcept(noexcept(CoreCallbackState< T, F >(std::declval< Promise< T > && >(), std::declval< F && >()))) |
template<typename T , typename R , typename... Args> | |
auto | makeCoreCallbackState (Promise< T > &&p, R(&f)(Args...)) noexcept |
template<class T > | |
Future< T > | chainExecutor (Executor *, Future< T > &&f) |
template<class T > | |
Future< T > | chainExecutor (Executor *e, SemiFuture< T > &&f) |
template<typename V , typename... Fs, std::size_t... Is> | |
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void | foreach_ (index_sequence< Is... >, V &&v, Fs &&...fs) |
template<typename V , typename... Fs> | |
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void | foreach (V &&v, Fs &&...fs) |
template<typename T > | |
DeferredExecutor * | getDeferredExecutor (SemiFuture< T > &future) |
template<typename T > | |
folly::Executor::KeepAlive< DeferredExecutor > | stealDeferredExecutor (SemiFuture< T > &future) |
template<typename T > | |
folly::Executor::KeepAlive< DeferredExecutor > | stealDeferredExecutor (Future< T > &) |
template<typename... Ts> | |
void | stealDeferredExecutorsVariadic (std::vector< folly::Executor::KeepAlive< DeferredExecutor >> &executors, Ts &...ts) |
template<class InputIterator > | |
void | stealDeferredExecutors (std::vector< folly::Executor::KeepAlive< DeferredExecutor >> &executors, InputIterator first, InputIterator last) |
template<class FutureType , typename T = typename FutureType::value_type> | |
void | waitImpl (FutureType &f) |
template<class T > | |
void | convertFuture (SemiFuture< T > &&sf, Future< T > &f) |
template<class T > | |
void | convertFuture (SemiFuture< T > &&sf, SemiFuture< T > &f) |
template<class FutureType , typename T = typename FutureType::value_type> | |
void | waitImpl (FutureType &f, Duration dur) |
template<class T > | |
void | waitViaImpl (Future< T > &f, DrivableExecutor *e) |
template<class T , typename Rep , typename Period > | |
void | waitViaImpl (Future< T > &f, TimedDrivableExecutor *e, const std::chrono::duration< Rep, Period > &timeout) |
template<typename T > | |
void | coreDetachPromiseMaybeWithResult (Core< T > &core) |
template<class Policy , class FF , class Prom > | |
void | retryingImpl (size_t k, Policy &&p, FF &&ff, Prom prom) |
template<class Policy , class FF > | |
invoke_result_t< FF, size_t > | retrying (size_t k, Policy &&p, FF &&ff) |
template<class Policy , class FF > | |
invoke_result_t< FF, size_t > | retrying (Policy &&p, FF &&ff, retrying_policy_raw_tag) |
template<class Policy , class FF > | |
invoke_result_t< FF, size_t > | retrying (Policy &&p, FF &&ff, retrying_policy_fut_tag) |
template<class URNG > | |
Duration | retryingJitteredExponentialBackoffDur (size_t n, Duration backoff_min, Duration backoff_max, double jitter_param, URNG &rng) |
template<class Policy , class URNG > | |
std::function< Future< bool >size_t, const exception_wrapper &)> | retryingPolicyCappedJitteredExponentialBackoff (size_t max_tries, Duration backoff_min, Duration backoff_max, double jitter_param, URNG &&rng, Policy &&p) |
template<class Policy , class URNG > | |
std::function< Future< bool >size_t, const exception_wrapper &)> | retryingPolicyCappedJitteredExponentialBackoff (size_t max_tries, Duration backoff_min, Duration backoff_max, double jitter_param, URNG &&rng, Policy &&p, retrying_policy_raw_tag) |
template<class Policy , class URNG > | |
std::function< Future< bool >size_t, const exception_wrapper &)> | retryingPolicyCappedJitteredExponentialBackoff (size_t max_tries, Duration backoff_min, Duration backoff_max, double jitter_param, URNG &&rng, Policy &&p, retrying_policy_fut_tag) |
Definition at line 45 of file Future-inl.h.
|
strong |
Future<T> folly::futures::detail::chainExecutor | ( | Executor * | , |
Future< T > && | f | ||
) |
Definition at line 370 of file Future-inl.h.
References f, and folly::gen::move.
Referenced by chainExecutor().
Future<T> folly::futures::detail::chainExecutor | ( | Executor * | e, |
SemiFuture< T > && | f | ||
) |
Definition at line 376 of file Future-inl.h.
References B, chainExecutor(), folly::futures::detail::FutureBase< T >::core_, folly::Promise< T >::core_, folly::exchange(), f, folly::futures::detail::FutureBase< T >::getCore(), folly::futures::detail::FutureBase< T >::getExecutor(), folly::Promise< T >::getSemiFuture(), folly::InlineExecutor::instance(), makeCoreCallbackState(), folly::gen::move, folly::futures::detail::FutureBase< T >::setCallback_(), folly::pushmi::detail::t, folly::futures::detail::FutureBase< T >::thenImplementation(), folly::futures::detail::detail_msvc_15_7_workaround::tryInvoke(), type, and value.
void folly::futures::detail::convertFuture | ( | SemiFuture< T > && | sf, |
Future< T > & | f | ||
) |
Definition at line 2026 of file Future-inl.h.
References exe, folly::futures::detail::FutureBase< T >::getExecutor(), folly::InlineExecutor::instance(), and folly::gen::move.
Referenced by folly::Future< folly::folly::Unit >::Future(), and folly::futures::detail::FutureBase< T >::setExecutor().
void folly::futures::detail::convertFuture | ( | SemiFuture< T > && | sf, |
SemiFuture< T > & | f | ||
) |
Definition at line 2033 of file Future-inl.h.
References folly::gen::move.
Referenced by waitImpl().
void folly::futures::detail::coreDetachPromiseMaybeWithResult | ( | Core< T > & | core | ) |
Definition at line 30 of file Promise-inl.h.
References folly::futures::detail::Core< T >::detachPromise(), folly::futures::detail::Core< T >::hasResult(), name, folly::futures::detail::Core< T >::setResult(), and folly::T.
Referenced by folly::Promise< T >::detach().
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void folly::futures::detail::foreach | ( | V && | v, |
Fs &&... | fs | ||
) |
Definition at line 1387 of file Future-inl.h.
References testing::_, foreach_(), and v.
Referenced by folly::collect(), and folly::collectAllSemiFuture().
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN void folly::futures::detail::foreach_ | ( | index_sequence< Is... > | , |
V && | v, | ||
Fs &&... | fs | ||
) |
Definition at line 1382 of file Future-inl.h.
References testing::_, and v.
Referenced by foreach().
DeferredExecutor * folly::futures::detail::getDeferredExecutor | ( | SemiFuture< T > & | future | ) |
Definition at line 1395 of file Future-inl.h.
References folly::SemiFuture< T >::getDeferredExecutor().
Referenced by folly::collectAllSemiFuture(), folly::collectAnyWithoutException(), folly::SemiFuture< T >::defer(), folly::SemiFuture< T >::SemiFuture(), folly::futures::detail::FutureBase< T >::setExecutor(), folly::SemiFuture< T >::via(), and folly::SemiFuture< T >::wait().
|
noexcept |
Definition at line 125 of file Future-inl.h.
References testing::Args(), f, folly::gen::move, and folly::T.
Referenced by chainExecutor(), folly::Future< T >::onError(), folly::Future< T >::onTimeout(), and folly::futures::detail::FutureBase< T >::thenImplementation().
|
noexcept |
Definition at line 133 of file Future-inl.h.
References testing::Args(), f, folly::gen::move, and folly::T.
invoke_result_t<FF, size_t> folly::futures::detail::retrying | ( | size_t | k, |
Policy && | p, | ||
FF && | ff | ||
) |
Definition at line 114 of file Retrying.h.
References f, folly::gen::move, retryingImpl(), and folly::T.
Referenced by folly::futures::retrying(), and retrying().
invoke_result_t<FF, size_t> folly::futures::detail::retrying | ( | Policy && | p, |
FF && | ff, | ||
retrying_policy_raw_tag | |||
) |
Definition at line 126 of file Retrying.h.
References k, folly::gen::move, and retrying().
invoke_result_t<FF, size_t> folly::futures::detail::retrying | ( | Policy && | p, |
FF && | ff, | ||
retrying_policy_fut_tag | |||
) |
Definition at line 135 of file Retrying.h.
References retrying().
void folly::futures::detail::retryingImpl | ( | size_t | k, |
Policy && | p, | ||
FF && | ff, | ||
Prom | prom | ||
) |
Definition at line 83 of file Retrying.h.
References folly::Try< T >::exception(), f, folly::Try< T >::hasValue(), folly::makeFutureWith(), folly::gen::move, folly::pushmi::detail::t, folly::T, folly::value(), and folly::Try< T >::value().
Referenced by retrying().
Duration folly::futures::detail::retryingJitteredExponentialBackoffDur | ( | size_t | n, |
Duration | backoff_min, | ||
Duration | backoff_max, | ||
double | jitter_param, | ||
URNG & | rng | ||
) |
Definition at line 141 of file Retrying.h.
References dist, max, min, and UNLIKELY.
Referenced by retryingPolicyCappedJitteredExponentialBackoff(), and TEST().
std::function<Future<bool>size_t, const exception_wrapper&)> folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff | ( | size_t | max_tries, |
Duration | backoff_min, | ||
Duration | backoff_max, | ||
double | jitter_param, | ||
URNG && | rng, | ||
Policy && | p | ||
) |
Definition at line 159 of file Retrying.h.
References folly::makeFuture(), folly::gen::move, retryingJitteredExponentialBackoffDur(), rng, and folly::futures::sleep().
Referenced by retryingPolicyCappedJitteredExponentialBackoff(), folly::futures::retryingPolicyCappedJitteredExponentialBackoff(), and TEST().
std::function<Future<bool>size_t, const exception_wrapper&)> folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff | ( | size_t | max_tries, |
Duration | backoff_min, | ||
Duration | backoff_max, | ||
double | jitter_param, | ||
URNG && | rng, | ||
Policy && | p, | ||
retrying_policy_raw_tag | |||
) |
Definition at line 191 of file Retrying.h.
References folly::makeFuture(), folly::gen::move, retryingPolicyCappedJitteredExponentialBackoff(), and rng.
std::function<Future<bool>size_t, const exception_wrapper&)> folly::futures::detail::retryingPolicyCappedJitteredExponentialBackoff | ( | size_t | max_tries, |
Duration | backoff_min, | ||
Duration | backoff_max, | ||
double | jitter_param, | ||
URNG && | rng, | ||
Policy && | p, | ||
retrying_policy_fut_tag | |||
) |
Definition at line 214 of file Retrying.h.
References retryingPolicyCappedJitteredExponentialBackoff(), and rng.
folly::Executor::KeepAlive< DeferredExecutor > folly::futures::detail::stealDeferredExecutor | ( | SemiFuture< T > & | future | ) |
Definition at line 1400 of file Future-inl.h.
References folly::SemiFuture< T >::stealDeferredExecutor().
Referenced by folly::SemiFuture< T >::SemiFuture(), and folly::futures::detail::FutureBase< T >::setExecutor().
folly::Executor::KeepAlive<DeferredExecutor> folly::futures::detail::stealDeferredExecutor | ( | Future< T > & | ) |
Definition at line 1406 of file Future-inl.h.
Referenced by stealDeferredExecutors(), and stealDeferredExecutorsVariadic().
void folly::futures::detail::stealDeferredExecutors | ( | std::vector< folly::Executor::KeepAlive< DeferredExecutor >> & | executors, |
InputIterator | first, | ||
InputIterator | last | ||
) |
Definition at line 1424 of file Future-inl.h.
References folly::pushmi::executor, folly::gen::move, and stealDeferredExecutor().
Referenced by folly::collectAllSemiFuture(), and folly::collectAnyWithoutException().
void folly::futures::detail::stealDeferredExecutorsVariadic | ( | std::vector< folly::Executor::KeepAlive< DeferredExecutor >> & | executors, |
Ts &... | ts | ||
) |
Definition at line 1411 of file Future-inl.h.
References folly::pushmi::executor, folly::gen::move, stealDeferredExecutor(), and folly::unit.
Referenced by folly::collectAllSemiFuture().
void folly::futures::detail::waitImpl | ( | FutureType & | f | ) |
Definition at line 2004 of file Future-inl.h.
References convertFuture(), folly::Promise< T >::getSemiFuture(), folly::InlineExecutor::instance(), folly::gen::move, folly::Promise< T >::setTry(), folly::pushmi::detail::t, and folly::futures::detail::FutureBase< T >::value().
Referenced by folly::SemiFuture< T >::wait(), and folly::Future< T >::wait().
void folly::futures::detail::waitImpl | ( | FutureType & | f, |
Duration | dur | ||
) |
Definition at line 2038 of file Future-inl.h.
References convertFuture(), folly::Promise< T >::getSemiFuture(), folly::InlineExecutor::instance(), folly::gen::move, folly::Promise< T >::setTry(), folly::pushmi::detail::t, and folly::futures::detail::FutureBase< T >::value().
void folly::futures::detail::waitViaImpl | ( | Future< T > & | f, |
DrivableExecutor * | e | ||
) |
Definition at line 2061 of file Future-inl.h.
References folly::DrivableExecutor::drive(), folly::InlineExecutor::instance(), folly::futures::detail::FutureBase< T >::isReady(), folly::gen::move, folly::pushmi::detail::t, and folly::T.
Referenced by folly::Future< T >::waitVia().
void folly::futures::detail::waitViaImpl | ( | Future< T > & | f, |
TimedDrivableExecutor * | e, | ||
const std::chrono::duration< Rep, Period > & | timeout | ||
) |
Definition at line 2077 of file Future-inl.h.
References folly::getKeepAliveToken(), folly::InlineExecutor::instance(), folly::futures::detail::FutureBase< T >::isReady(), folly::gen::move, now(), folly::pushmi::detail::t, folly::T, and folly::TimedDrivableExecutor::try_drive_until().