Commit c3ec0bd2 authored by Yanan Xin's avatar Yanan Xin Committed by Facebook Github Bot

Add getTaskQueueSize() method in CPUThreadPoolExecutor

Summary: Add getTaskQueueSize() method in CPUThreadPoolExecutor

Reviewed By: yfeldblum

Differential Revision: D7294802

fbshipit-source-id: 1f37558a1f14fcc2888c654248d649365c323432
parent 131cbd22
......@@ -104,6 +104,10 @@ uint8_t CPUThreadPoolExecutor::getNumPriorities() const {
return taskQueue_->getNumPriorities();
}
size_t CPUThreadPoolExecutor::getTaskQueueSize() const {
return taskQueue_->size();
}
BlockingQueue<CPUThreadPoolExecutor::CPUTask>*
CPUThreadPoolExecutor::getTaskQueue() {
return taskQueue_.get();
......
......@@ -104,6 +104,8 @@ class CPUThreadPoolExecutor : public ThreadPoolExecutor {
std::chrono::milliseconds expiration,
Func expireCallback = nullptr);
size_t getTaskQueueSize() const;
uint8_t getNumPriorities() const override;
struct CPUTask : public ThreadPoolExecutor::Task {
......
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