Commit f07f33e5 authored by Misha Shneerson's avatar Misha Shneerson Committed by Facebook GitHub Bot

add priorities support to thread manager executor adapter

Summary:
Adding priorities to `ThreadManagerExecutorAdapter`. The API allows to pass single executor that would be used for all priorities (preserved behavior) but also allows to add custom executors per-priority. In this case, if no executor has been provided for priority, we will spin up default thread manager implementation (which supports upstream queues).

We soon will add upstream queues on top of user-provided executors as well.

Reviewed By: prshreshtha

Differential Revision: D25137444

fbshipit-source-id: db0740a705dd3cca69916f3d1b8c4e32c011aa43
parent 5398ad14
...@@ -51,6 +51,8 @@ class MeteredExecutor : public DefaultKeepAliveExecutor { ...@@ -51,6 +51,8 @@ class MeteredExecutor : public DefaultKeepAliveExecutor {
void add(Func func) override; void add(Func func) override;
size_t pendingTasks() const { return queue_.size(); }
private: private:
void loopCallback(); void loopCallback();
void scheduleCallback(); void scheduleCallback();
......
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