proxygen
|
Single-threaded task execution engine. More...
#include <FiberManagerInternal.h>
Classes | |
struct | AddTaskFinallyHelper |
struct | AddTaskHelper |
struct | FibersPoolResizer |
struct | Options |
struct | RemoteTask |
Public Types | |
using | ExceptionCallback = folly::Function< void(std::exception_ptr, std::string)> |
Public Member Functions | |
FiberManager (const FiberManager &)=delete | |
FiberManager & | operator= (const FiberManager &)=delete |
FiberManager (std::unique_ptr< LoopController > loopController, Options options=Options()) | |
template<typename LocalT > | |
FiberManager (LocalType< LocalT >, std::unique_ptr< LoopController > loopController, Options options=Options()) | |
~FiberManager () override | |
LoopController & | loopController () |
const LoopController & | loopController () const |
void | loopUntilNoReady () |
void | loopUntilNoReadyImpl () |
bool | shouldRunLoopRemote () |
bool | hasTasks () const |
bool | hasReadyTasks () const |
void | setExceptionCallback (ExceptionCallback ec) |
template<typename F > | |
void | addTask (F &&func) |
template<typename F > | |
auto | addTaskFuture (F &&func) -> folly::Future< typename folly::lift_unit< invoke_result_t< F >>::type > |
template<typename F > | |
void | addTaskRemote (F &&func) |
template<typename F > | |
auto | addTaskRemoteFuture (F &&func) -> folly::Future< typename folly::lift_unit< invoke_result_t< F >>::type > |
void | add (folly::Func f) override |
template<typename F , typename G > | |
void | addTaskFinally (F &&func, G &&finally) |
template<typename F > | |
invoke_result_t< F > | runInMainContext (F &&func) |
template<typename T > | |
T & | local () |
size_t | fibersAllocated () const |
size_t | fibersPoolSize () const |
bool | hasActiveFiber () const |
Fiber * | currentFiber () const |
size_t | stackHighWatermark () const |
void | yield () |
void | setObserver (ExecutionObserver *observer) |
ExecutionObserver * | getObserver () |
void | setPreemptRunner (InlineFunctionRunner *preemptRunner) |
size_t | runQueueSize () const |
template<typename T > | |
T & | localThread () |
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 | |
template<typename T > | |
static FOLLY_EXPORT T & | localThread () |
static FiberManager & | getFiberManager () |
static FiberManager * | getFiberManagerUnsafe () |
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 | |
typedef folly::IntrusiveList< Fiber,&Fiber::listHook_ > | FiberTailQueue |
typedef folly::IntrusiveList< Fiber,&Fiber::globalListHook_ > | GlobalFiberTailQueue |
Private Member Functions | |
void | activateFiber (Fiber *fiber) |
void | deactivateFiber (Fiber *fiber) |
void | ensureLoopScheduled () |
Fiber * | getFiber () |
void | initLocalData (Fiber &fiber) |
void | doFibersPoolResizing () |
void | runReadyFiber (Fiber *fiber) |
void | remoteReadyInsert (Fiber *fiber) |
void | registerAlternateSignalStack () |
Static Private Attributes | |
static FOLLY_TLS FiberManager * | currentFiberManager_ = nullptr |
Friends | |
class | Baton |
class | Fiber |
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 |
Protected Member Functions inherited from folly::Executor | |
virtual bool | keepAliveAcquire () |
virtual void | keepAliveRelease () |
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) |
Single-threaded task execution engine.
FiberManager allows semi-parallel task execution on the same thread. Each task can notify FiberManager that it is blocked on something (via await()) call. This will pause execution of this task and it will be resumed only when it is unblocked (via setData()).
Definition at line 77 of file FiberManagerInternal.h.
using folly::fibers::FiberManager::ExceptionCallback = folly::Function<void(std::exception_ptr, std::string)> |
Definition at line 129 of file FiberManagerInternal.h.
|
private |
Definition at line 370 of file FiberManagerInternal.h.
|
private |
Definition at line 372 of file FiberManagerInternal.h.
|
delete |
|
explicit |
Initializes, but doesn't start FiberManager loop
loopController | |
options | FiberManager options |
Definition at line 73 of file FiberManager.cpp.
folly::fibers::FiberManager::FiberManager | ( | LocalType< LocalT > | , |
std::unique_ptr< LoopController > | loopController, | ||
Options | options = Options() |
||
) |
Initializes, but doesn't start FiberManager loop
loopController | |
options | FiberManager options |
LocalT | only local of this type may be stored on fibers. Locals of other types will be considered thread-locals. |
Definition at line 531 of file FiberManagerInternal-inl.h.
References context, folly::DFATAL, fibersPoolResizer_, localType_, loopController_, name, and timeoutManager_.
|
override |
Definition at line 81 of file FiberManager.cpp.
References fibersActive_, fibersPool_, loopController_, and readyFibers_.
|
inlineprivate |
Definition at line 59 of file FiberManagerInternal-inl.h.
References folly::fibers::FiberImpl::activate(), activeFiber_, folly::fibers::Fiber::fiberImpl_, folly::fibers::Fiber::getStack(), and SCOPE_EXIT.
Referenced by runReadyFiber().
|
inlineoverridevirtual |
Enqueue a function to executed by this executor. This and all variants must be threadsafe.
Implements folly::Executor.
Definition at line 239 of file FiberManagerInternal.h.
References folly::fibers::addTaskFinally(), FOLLY_EXPORT, folly::fibers::local(), folly::gen::move, folly::fibers::runInMainContext(), and folly::T.
Referenced by folly::FiberIOExecutor::add(), and AtomicBatchDispatcherTesting::dispatchJobs().
void folly::fibers::FiberManager::addTask | ( | F && | func | ) |
Add a new task to be executed. Must be called from FiberManager's thread.
func | Task functor; must have a signature of void func() . The object will be destroyed once task execution is complete. |
Definition at line 306 of file FiberManagerInternal-inl.h.
References ensureLoopScheduled(), getFiber(), initLocalData(), observer_, readyFibers_, and folly::ExecutionObserver::runnable().
Referenced by folly::fibers::addTask(), BENCHMARK(), main(), runBenchmark(), TEST(), and testFiberLocal().
void folly::fibers::FiberManager::addTaskFinally | ( | F && | func, |
G && | finally | ||
) |
Add a new task. When the task is complete, execute finally(Try<Result>&&) on the main context.
func | Task functor; must have a signature of T func() for some T. |
finally | Finally functor; must have a signature of void finally(Try<T>&&) and will be passed the result of func() (including the exception if occurred). |
Definition at line 417 of file FiberManagerInternal-inl.h.
References ensureLoopScheduled(), getFiber(), initLocalData(), observer_, readyFibers_, folly::ExecutionObserver::runnable(), type, and folly::value().
Referenced by folly::fibers::addTaskFinally(), and TEST().
auto folly::fibers::FiberManager::addTaskFuture | ( | F && | func | ) | -> folly::Future<typename folly::lift_unit<invoke_result_t<F>>::type> |
Add a new task to be executed and return a future that will be set on return from func. Must be called from FiberManager's thread.
func | Task functor; must have a signature of void func() . The object will be destroyed once task execution is complete. |
Definition at line 25 of file FiberManager-inl.h.
References folly::fibers::addTaskFinally(), f, folly::Promise< T >::getFuture(), folly::gen::move, folly::Promise< T >::setTry(), folly::pushmi::detail::t, and folly::T.
Referenced by TEST().
void folly::fibers::FiberManager::addTaskRemote | ( | F && | func | ) |
Add a new task to be executed. Safe to call from other threads.
func | Task function; must have a signature of void func() . The object will be destroyed once task execution is complete. |
Definition at line 332 of file FiberManagerInternal-inl.h.
References getFiberManagerUnsafe(), localType_, loopController_, and remoteTaskQueue_.
Referenced by TEST(), and testFiberLocal().
auto folly::fibers::FiberManager::addTaskRemoteFuture | ( | F && | func | ) | -> folly::Future<typename folly::lift_unit<invoke_result_t<F>>::type> |
Add a new task to be executed and return a future that will be set on return from func. Safe to call from other threads.
func | Task function; must have a signature of void func() . The object will be destroyed once task execution is complete. |
Definition at line 41 of file FiberManager-inl.h.
References f, folly::Promise< T >::getFuture(), folly::makeTryWith(), folly::gen::move, folly::fibers::runInMainContext(), folly::Promise< T >::setTry(), folly::pushmi::detail::t, and type.
Referenced by TEST().
|
inline |
Definition at line 297 of file FiberManagerInternal.h.
References folly::fibers::yield().
|
inlineprivate |
Definition at line 79 of file FiberManagerInternal-inl.h.
References activeFiber_, folly::fibers::FiberImpl::deactivate(), folly::fibers::Fiber::fiberImpl_, and SCOPE_EXIT.
Referenced by folly::fibers::Fiber::fiberFunc(), and folly::fibers::Fiber::preempt().
|
private |
Definition at line 170 of file FiberManager.cpp.
References fibersActive_, fibersAllocated_, fibersPool_, fibersPoolSize_, maxFibersActiveLastPeriod_, folly::fibers::FiberManager::Options::maxFibersPoolSize, and options_.
|
inlineprivate |
Schedules a loop with loopController (unless already scheduled before).
Definition at line 50 of file FiberManagerInternal-inl.h.
References isLoopScheduled_, and loopController_.
Referenced by addTask(), addTaskFinally(), loopUntilNoReadyImpl(), and folly::fibers::Fiber::resume().
size_t folly::fibers::FiberManager::fibersAllocated | ( | ) | const |
Definition at line 137 of file FiberManager.cpp.
References fibersAllocated_.
Referenced by TEST().
size_t folly::fibers::FiberManager::fibersPoolSize | ( | ) | const |
Definition at line 141 of file FiberManager.cpp.
References fibersPoolSize_.
Referenced by BENCHMARK(), and TEST().
|
private |
Definition at line 104 of file FiberManager.cpp.
References Fiber, fiberId_, fibersActive_, fibersAllocated_, fibersPool_, folly::fibers::FiberManager::Options::fibersPoolResizePeriodMs, fibersPoolResizer_, fibersPoolResizerScheduled_, fibersPoolSize_, folly::fibers::Fiber::init(), maxFibersActiveLastPeriod_, options_, and folly::fibers::FiberManager::Options::recordStackEvery.
Referenced by addTask(), addTaskFinally(), and loopUntilNoReadyImpl().
|
inlinestatic |
Definition at line 483 of file FiberManagerInternal-inl.h.
References currentFiberManager_.
Referenced by folly::fibers::addTask(), and folly::fibers::addTaskFinally().
|
inlinestatic |
Definition at line 488 of file FiberManagerInternal-inl.h.
References currentFiberManager_.
Referenced by addTaskRemote(), initLocalData(), folly::fibers::local(), folly::fibers::onFiber(), folly::fibers::runInMainContext(), TEST(), folly::fibers::Baton::try_wait_for(), folly::fibers::Baton::wait(), and folly::fibers::yield().
ExecutionObserver * folly::fibers::FiberManager::getObserver | ( | ) |
Definition at line 162 of file FiberManager.cpp.
References observer_.
|
inline |
return true if running activeFiber_ is not nullptr.
Definition at line 492 of file FiberManagerInternal-inl.h.
References activeFiber_.
Referenced by TEST().
|
inline |
Definition at line 267 of file FiberManagerInternal-inl.h.
References readyFibers_, remoteReadyQueue_, and remoteTaskQueue_.
Referenced by folly::fibers::EventBaseLoopController::runLoop().
bool folly::fibers::FiberManager::hasTasks | ( | ) | const |
Definition at line 99 of file FiberManager.cpp.
References fibersActive_, remoteCount_, remoteReadyQueue_, and remoteTaskQueue_.
Referenced by folly::fibers::SimpleLoopController::loop(), folly::fibers::ExecutorLoopController::runLoop(), folly::fibers::EventBaseLoopController::runLoop(), folly::fibers::EventBaseLoopController::scheduleThreadSafe(), TEST(), and testFiberLocal().
|
inlineprivate |
Sets local data for given fiber if all conditions are met.
Definition at line 522 of file FiberManagerInternal-inl.h.
References getFiberManagerUnsafe(), folly::fibers::Fiber::localData_, localType_, folly::fibers::Fiber::rcontext_, and folly::RequestContext::saveContext().
Referenced by addTask(), and addTaskFinally().
T & folly::fibers::FiberManager::local | ( | ) |
Returns a refference to a fiber-local context for given Fiber. Should be always called with the same T for each fiber. Fiber-local context is lazily default-constructed on first request. When new task is scheduled via addTask / addTaskRemote from a fiber its fiber-local context is copied into the new fiber.
Definition at line 504 of file FiberManagerInternal-inl.h.
References currentFiber_, folly::fibers::Fiber::LocalData::get(), folly::fibers::Fiber::localData_, localType_, and folly::T.
|
static |
T& folly::fibers::FiberManager::localThread | ( | ) |
Definition at line 512 of file FiberManagerInternal-inl.h.
References folly::pushmi::detail::t, and folly::T.
LoopController & folly::fibers::FiberManager::loopController | ( | ) |
Controller access.
Definition at line 91 of file FiberManager.cpp.
References loopController_.
Referenced by main(), runBenchmark(), and TEST().
const LoopController & folly::fibers::FiberManager::loopController | ( | ) | const |
Definition at line 95 of file FiberManager.cpp.
References loopController_.
|
inline |
Keeps running ready tasks until the list of ready tasks is empty.
Definition at line 186 of file FiberManagerInternal-inl.h.
References loopController_.
Referenced by BENCHMARK(), TEST(), and testFiberLocal().
|
inline |
This should only be called by a LoopController.
Definition at line 190 of file FiberManagerInternal-inl.h.
References alternateSignalStackRegistered_, currentFiberManager_, ensureLoopScheduled(), folly::fibers::FiberManager::RemoteTask::func, getFiber(), isLoopScheduled_, folly::fibers::FiberManager::RemoteTask::localData, folly::fibers::Fiber::localData_, folly::gen::move, observer_, folly::fibers::FiberManager::RemoteTask::rcontext, folly::fibers::Fiber::rcontext_, readyFibers_, registerAlternateSignalStack(), remoteCount_, remoteReadyQueue_, remoteTaskQueue_, folly::ExecutionObserver::runnable(), runReadyFiber(), folly::RequestContext::saveContext(), SCOPE_EXIT, folly::RequestContext::setContext(), folly::fibers::Fiber::setFunction(), folly::f14::swap(), UNLIKELY, and yieldedFibers_.
Referenced by folly::fibers::ExecutorLoopController::runLoop(), folly::fibers::EventBaseLoopController::runLoop(), and folly::fibers::SimpleLoopController::runLoop().
|
delete |
Referenced by folly::fibers::FiberManager::FibersPoolResizer::operator()().
|
private |
Definition at line 361 of file FiberManager.cpp.
References alternateSignalStackRegistered_, and folly::SingletonThreadLocal< T, Tag, Make, TLTag >::get().
Referenced by loopUntilNoReadyImpl().
|
private |
Definition at line 149 of file FiberManager.cpp.
References loopController_, observer_, remoteReadyQueue_, and folly::ExecutionObserver::runnable().
Referenced by folly::fibers::Fiber::resume().
invoke_result_t< F > folly::fibers::FiberManager::runInMainContext | ( | F && | func | ) |
If called from a fiber, immediately switches to the FiberManager's context and runs func(), going back to the Fiber's context after completion. Outside a fiber, just calls func() directly.
Definition at line 465 of file FiberManagerInternal-inl.h.
References activeFiber_, folly::fibers::Fiber::AWAITING_IMMEDIATE, f, immediateFunc_, folly::gen::move, folly::fibers::Fiber::preempt(), folly::tryEmplaceWith(), and UNLIKELY.
Referenced by TEST().
|
inline |
Returns an estimate of the number of fibers which are waiting to run (does not include fibers or tasks scheduled remotely).
Definition at line 337 of file FiberManagerInternal.h.
References folly::fibers::getFiberManager().
|
inlineprivate |
Definition at line 103 of file FiberManagerInternal-inl.h.
References activateFiber(), activeFiber_, awaitFunc_, folly::fibers::Fiber::AWAITING, folly::fibers::Fiber::AWAITING_IMMEDIATE, currentFiber_, exceptionCallback_, fibersActive_, fibersAllocated_, fibersPool_, folly::fibers::FiberManager::Options::fibersPoolResizePeriodMs, fibersPoolSize_, folly::fibers::Fiber::finallyFunc_, folly::fibers::Fiber::func_, immediateFunc_, folly::fibers::Fiber::INVALID, folly::fibers::Fiber::localData_, folly::fibers::FiberManager::Options::maxFibersPoolSize, folly::gen::move, folly::fibers::Fiber::NOT_STARTED, observer_, options_, folly::fibers::Fiber::rcontext_, folly::fibers::Fiber::READY_TO_RUN, folly::fibers::Fiber::LocalData::reset(), folly::fibers::Fiber::resultFunc_, folly::RequestContext::saveContext(), SCOPE_EXIT, folly::RequestContext::setContext(), folly::ExecutionObserver::starting(), folly::fibers::Fiber::state_, folly::ExecutionObserver::stopped(), folly::fibers::Fiber::YIELDED, and yieldedFibers_.
Referenced by loopUntilNoReadyImpl().
void folly::fibers::FiberManager::setExceptionCallback | ( | FiberManager::ExceptionCallback | ec | ) |
Sets exception callback which will be called if any of the tasks throws an exception.
ec |
Definition at line 132 of file FiberManager.cpp.
References exceptionCallback_, and folly::gen::move.
void folly::fibers::FiberManager::setObserver | ( | ExecutionObserver * | observer | ) |
Setup fibers execution observation/instrumentation. Fiber locals are available to observer.
observer | Fiber's execution observer. |
Definition at line 158 of file FiberManager.cpp.
References observer_.
void folly::fibers::FiberManager::setPreemptRunner | ( | InlineFunctionRunner * | preemptRunner | ) |
Setup fibers preempt runner.
Definition at line 166 of file FiberManager.cpp.
References preemptRunner_.
|
inline |
This should only be called by a LoopController.
Definition at line 262 of file FiberManagerInternal-inl.h.
References remoteCount_, remoteReadyQueue_, and remoteTaskQueue_.
Referenced by folly::fibers::SimpleLoopController::runLoop(), folly::fibers::ExecutorLoopController::scheduleThreadSafe(), and folly::fibers::EventBaseLoopController::scheduleThreadSafe().
size_t folly::fibers::FiberManager::stackHighWatermark | ( | ) | const |
Definition at line 145 of file FiberManager.cpp.
References stackHighWatermark_.
Referenced by TEST().
|
inline |
Yield execution of the currently running fiber. Must only be called from a fiber executing on this FiberManager. The calling fiber will be scheduled when all other fibers have had a chance to run and the event loop is serviced.
Definition at line 496 of file FiberManagerInternal-inl.h.
References activeFiber_, currentFiberManager_, folly::fibers::Fiber::preempt(), folly::fibers::Fiber::RUNNING, folly::fibers::Fiber::state_, and folly::fibers::Fiber::YIELDED.
Referenced by AtomicBatchDispatcherTesting::Job::preprocess(), and TEST().
|
friend |
Definition at line 345 of file FiberManagerInternal.h.
|
friend |
Definition at line 346 of file FiberManagerInternal.h.
Referenced by getFiber().
active fiber, nullptr on main context
Definition at line 374 of file FiberManagerInternal.h.
Referenced by activateFiber(), deactivateFiber(), hasActiveFiber(), folly::fibers::Fiber::preempt(), runInMainContext(), runReadyFiber(), folly::fibers::Baton::waitFiber(), and yield().
|
private |
list of all Fiber objects owned
Definition at line 386 of file FiberManagerInternal.h.
Referenced by folly::fibers::Fiber::Fiber().
|
private |
Definition at line 508 of file FiberManagerInternal.h.
Referenced by loopUntilNoReadyImpl(), and registerAlternateSignalStack().
|
private |
Function passed to the await call.
Definition at line 439 of file FiberManagerInternal.h.
Referenced by runReadyFiber(), and folly::fibers::Baton::waitFiber().
Same as active fiber, but also set for functions run from fiber on main context.
Definition at line 379 of file FiberManagerInternal.h.
Referenced by local(), and runReadyFiber().
|
staticprivate |
When we are inside FiberManager loop this points to FiberManager. Otherwise it's nullptr
Definition at line 406 of file FiberManagerInternal.h.
Referenced by getFiberManager(), getFiberManagerUnsafe(), loopUntilNoReadyImpl(), and yield().
|
private |
task exception callback
Definition at line 456 of file FiberManagerInternal.h.
Referenced by folly::fibers::Fiber::fiberFunc(), runReadyFiber(), and setExceptionCallback().
|
private |
id of last fiber used
Definition at line 391 of file FiberManagerInternal.h.
Referenced by getFiber().
|
private |
number of running or blocked fibers
Definition at line 390 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), getFiber(), hasTasks(), runReadyFiber(), and ~FiberManager().
|
private |
total number of fibers allocated
Definition at line 388 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), fibersAllocated(), getFiber(), and runReadyFiber().
|
private |
pool of uninitialized Fiber objects
Definition at line 384 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), getFiber(), runReadyFiber(), and ~FiberManager().
|
private |
Definition at line 476 of file FiberManagerInternal.h.
Referenced by FiberManager(), and getFiber().
|
private |
Definition at line 477 of file FiberManagerInternal.h.
Referenced by getFiber().
|
private |
total number of fibers in the free pool
Definition at line 389 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), fibersPoolSize(), getFiber(), and runReadyFiber().
|
private |
Function passed to the runInMainContext call.
Definition at line 444 of file FiberManagerInternal.h.
Referenced by runInMainContext(), and runReadyFiber().
|
private |
was the ready loop scheduled to run?
Definition at line 400 of file FiberManagerInternal.h.
Referenced by ensureLoopScheduled(), and loopUntilNoReadyImpl().
|
private |
Only local of this type will be available for fibers.
Definition at line 484 of file FiberManagerInternal.h.
Referenced by addTaskRemote(), FiberManager(), initLocalData(), and local().
|
private |
Definition at line 399 of file FiberManagerInternal.h.
Referenced by addTaskRemote(), ensureLoopScheduled(), FiberManager(), loopController(), loopUntilNoReady(), remoteReadyInsert(), and ~FiberManager().
|
private |
Maximum number of active fibers in the last period lasting Options::fibersPoolResizePeriod milliseconds.
Definition at line 397 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), and getFiber().
|
private |
Fiber's execution observer.
Definition at line 454 of file FiberManagerInternal.h.
Referenced by addTask(), addTaskFinally(), getObserver(), loopUntilNoReadyImpl(), remoteReadyInsert(), folly::fibers::Fiber::resume(), runReadyFiber(), and setObserver().
|
private |
FiberManager options
Definition at line 414 of file FiberManagerInternal.h.
Referenced by doFibersPoolResizing(), folly::fibers::Fiber::fiberFunc(), getFiber(), and runReadyFiber().
|
private |
Preempt runner.
Definition at line 449 of file FiberManagerInternal.h.
Referenced by folly::fibers::Fiber::preempt(), and setPreemptRunner().
|
private |
queue of fibers ready to be executed
Definition at line 381 of file FiberManagerInternal.h.
Referenced by addTask(), addTaskFinally(), hasReadyTasks(), loopUntilNoReadyImpl(), folly::fibers::Fiber::resume(), and ~FiberManager().
|
private |
Definition at line 464 of file FiberManagerInternal.h.
Referenced by hasTasks(), loopUntilNoReadyImpl(), and shouldRunLoopRemote().
|
private |
Definition at line 459 of file FiberManagerInternal.h.
Referenced by hasReadyTasks(), hasTasks(), loopUntilNoReadyImpl(), remoteReadyInsert(), and shouldRunLoopRemote().
|
private |
Definition at line 462 of file FiberManagerInternal.h.
Referenced by addTaskRemote(), hasReadyTasks(), hasTasks(), loopUntilNoReadyImpl(), and shouldRunLoopRemote().
|
private |
Allocator used to allocate stack for Fibers in the pool. Allocates stack on the stack of the main context.
Definition at line 412 of file FiberManagerInternal.h.
Referenced by folly::fibers::Fiber::~Fiber().
|
private |
Largest observed individual Fiber stack usage in bytes.
Definition at line 419 of file FiberManagerInternal.h.
Referenced by folly::fibers::Fiber::fiberFunc(), folly::fibers::Fiber::recordStackPosition(), and stackHighWatermark().
|
private |
Definition at line 466 of file FiberManagerInternal.h.
Referenced by FiberManager().
|
private |
queue of fibers which have yielded execution
Definition at line 382 of file FiberManagerInternal.h.
Referenced by loopUntilNoReadyImpl(), and runReadyFiber().