|
proxygen
|
#include <Future-inl.h>
Public Member Functions | |
| void | add (Func func) override |
| void | setExecutor (folly::Executor::KeepAlive<> executor) |
| void | detach () |
| void | setNestedExecutors (std::vector< folly::Executor::KeepAlive< DeferredExecutor >> executors) |
Public Member Functions inherited from folly::Executor | |
| virtual | ~Executor () |
| virtual void | addWithPriority (Func, int8_t priority) |
| virtual uint8_t | getNumPriorities () const |
Static Public Member Functions | |
| static KeepAlive< DeferredExecutor > | create () |
Static Public Member Functions inherited from folly::Executor | |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT *executor) |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | getKeepAliveToken (ExecutorT &executor) |
Private Types | |
| enum | State { State::EMPTY, State::HAS_FUNCTION, State::HAS_EXECUTOR, State::DETACHED } |
Private Member Functions | |
| DeferredExecutor () | |
| bool | keepAliveAcquire () override |
| void | keepAliveRelease () override |
Private Attributes | |
| std::atomic< State > | state_ {State::EMPTY} |
| Func | func_ |
| folly::Executor::KeepAlive | executor_ |
| std::unique_ptr< std::vector< folly::Executor::KeepAlive< DeferredExecutor > > > | nestedExecutors_ |
| std::atomic< ssize_t > | keepAliveCount_ {1} |
Additional Inherited Members | |
Static Public Attributes inherited from folly::Executor | |
| static const int8_t | LO_PRI = SCHAR_MIN |
| static const int8_t | MID_PRI = 0 |
| static const int8_t | HI_PRI = SCHAR_MAX |
Static Protected Member Functions inherited from folly::Executor | |
| template<typename ExecutorT > | |
| static bool | isKeepAliveDummy (const KeepAlive< ExecutorT > &keepAlive) |
| template<typename ExecutorT > | |
| static KeepAlive< ExecutorT > | makeKeepAlive (ExecutorT *executor) |
Defer work until executor is actively boosted.
NOTE: that this executor is a private implementation detail belonging to the Folly Futures library and not intended to be used elsewhere. It is designed specifically for the use case of deferring work on a SemiFuture. It is NOT thread safe. Please do not use for any other purpose without great care.
Definition at line 497 of file Future-inl.h.
|
strongprivate |
| Enumerator | |
|---|---|
| EMPTY | |
| HAS_FUNCTION | |
| HAS_EXECUTOR | |
| DETACHED | |
Definition at line 601 of file Future-inl.h.
|
inlineprivate |
Definition at line 583 of file Future-inl.h.
|
inlineoverridevirtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Definition at line 499 of file Future-inl.h.
References folly::exchange(), and folly::gen::move.
|
inlinestatic |
Definition at line 578 of file Future-inl.h.
Referenced by folly::SemiFuture< T >::defer().
|
inline |
Definition at line 548 of file Future-inl.h.
References folly::exchange().
|
inlineoverrideprivatevirtual |
Reimplemented from folly::Executor.
Definition at line 585 of file Future-inl.h.
|
inlineoverrideprivatevirtual |
Reimplemented from folly::Executor.
Definition at line 592 of file Future-inl.h.
|
inline |
Definition at line 525 of file Future-inl.h.
References folly::Executor::KeepAlive< ExecutorT >::copy(), folly::exchange(), and folly::gen::move.
|
inline |
Definition at line 570 of file Future-inl.h.
References folly::make_unique(), and folly::gen::move.
|
private |
Definition at line 604 of file Future-inl.h.
|
private |
Definition at line 603 of file Future-inl.h.
|
private |
Definition at line 607 of file Future-inl.h.
|
private |
Definition at line 606 of file Future-inl.h.
|
private |
Definition at line 602 of file Future-inl.h.