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

Make getGlobalIOExecutor return a KeepAlive<IOExecutor>

Summary: By returning a generic KeepAlive<> the global IO executor was losing the IOExecutor interface. This fixes it by returning the right type.

Reviewed By: yfeldblum

Differential Revision: D27061083

fbshipit-source-id: d57f67982c3467a6b814b17e851e4513ffd33502
parent 47ed7d6e
......@@ -150,7 +150,7 @@ Executor::KeepAlive<> getGlobalCPUExecutor() {
return folly::getKeepAliveToken(executorPtrPtr->get());
}
Executor::KeepAlive<> getGlobalIOExecutor() {
Executor::KeepAlive<IOExecutor> getGlobalIOExecutor() {
auto executorPtrPtr = getImmutablePtrPtr<IOExecutor>();
if (!executorPtrPtr) {
throw std::runtime_error("Requested global IO executor during shutdown.");
......
......@@ -41,7 +41,7 @@ folly::Executor::KeepAlive<> getGlobalCPUExecutor();
*
* May return an invalid KeepAlive on shutdown.
*/
folly::Executor::KeepAlive<> getGlobalIOExecutor();
folly::Executor::KeepAlive<IOExecutor> getGlobalIOExecutor();
/**
* Retrieve the global Executor. If there is none, a default InlineExecutor
......
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