Commit 207ab876 authored by Brian Watling's avatar Brian Watling Committed by facebook-github-bot-1

Add accessor to estimate a FiberManager's run queue size

Summary: Add accessor to estimate a FiberManager's run queue size

Reviewed By: @sarangbh

Differential Revision: D2293367
parent d7c649a4
......@@ -252,6 +252,14 @@ class FiberManager : public ::folly::Executor {
*/
void setObserver(ExecutionObserver* observer);
/**
* Returns an estimate of the number of fibers which are waiting to run (does
* not include fibers or tasks scheduled remotely).
*/
size_t runQueueSize() const {
return readyFibers_.size() + yieldedFibers_.size();
}
static FiberManager& getFiberManager();
static FiberManager* getFiberManagerUnsafe();
......
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