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

Remove use of default SerialExecutor

Summary: Remove all uses of the default SerialExecutor by changing callsites to be explicit, and removing the default parameter. This will allow us to change the default to a safer option in a subsequent diff.

Reviewed By: yfeldblum

Differential Revision: D28842180

fbshipit-source-id: 93027dcf8b19c44380534dabd731651780dac90e
parent 61943560
......@@ -57,9 +57,7 @@ class SerialExecutor : public SequencedExecutor {
SerialExecutor(SerialExecutor&&) = delete;
SerialExecutor& operator=(SerialExecutor&&) = delete;
static KeepAlive<SerialExecutor> create(
KeepAlive<Executor> parent =
getKeepAliveToken(getUnsafeMutableGlobalCPUExecutor().get()));
static KeepAlive<SerialExecutor> create(KeepAlive<Executor> parent);
class Deleter {
public:
......
......@@ -179,7 +179,8 @@ TEST(SerialExecutor, RecursiveAddInline) {
}
TEST(SerialExecutor, ExecutionThrows) {
auto executor = SerialExecutor::create();
auto executor = SerialExecutor::create(folly::getKeepAliveToken(
folly::getUnsafeMutableGlobalCPUExecutor().get()));
// an empty Func will throw std::bad_function_call when invoked,
// but SerialExecutor should catch that exception
......
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