Commit cbb8cd2a authored by Lee Howes's avatar Lee Howes Committed by Facebook GitHub Bot

Privately expose DefaultCPUExecutor as a form of InlineExecutor

Summary: DefaultCPUExecutor is the same as InlineExecutor, but hidden to avoid instantiating it to allow filtering on type, primarily in coro::task.

Reviewed By: mpark, terrelln

Differential Revision: D26077566

fbshipit-source-id: 06704134f2446727cbb9f093df0b1954b46d2e49
parent f60b081a
......@@ -138,6 +138,9 @@ namespace detail {
std::shared_ptr<Executor> tryGetImmutableCPUPtr() {
return getImmutable<Executor>();
}
bool isDefaultExecutor(Executor* ex) {
return dynamic_cast<DefaultCPUExecutor*>(ex);
}
} // namespace detail
Executor::KeepAlive<> getGlobalCPUExecutor() {
......
......@@ -25,7 +25,8 @@ namespace folly {
namespace detail {
std::shared_ptr<Executor> tryGetImmutableCPUPtr();
}
bool isDefaultExecutor(Executor*);
} // namespace detail
/**
* Return the global executor.
......
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