diff --git a/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm b/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm index cb38882cea4..ad8231d4fa0 100644 --- a/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm @@ -15,7 +15,6 @@ #import #import -#import "MainQueueExecutor.h" #import "RCTConversions.h" @implementation RCTImageComponentView { diff --git a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm index 0850789a0b1..f71ab528394 100644 --- a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm @@ -13,8 +13,6 @@ #import #import -#import "MainQueueExecutor.h" - using namespace facebook::react; @implementation RCTSliderComponentView { diff --git a/React/Fabric/Utils/MainQueueExecutor.h b/React/Fabric/Utils/MainQueueExecutor.h deleted file mode 100644 index 5864e58e8e6..00000000000 --- a/React/Fabric/Utils/MainQueueExecutor.h +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include - -namespace facebook { -namespace react { - -class MainQueueExecutor : public folly::Executor { - public: - static MainQueueExecutor &instance(); - - void add(folly::Func function) override; -}; - -} // namespace react -} // namespace facebook diff --git a/React/Fabric/Utils/MainQueueExecutor.mm b/React/Fabric/Utils/MainQueueExecutor.mm deleted file mode 100644 index 55749261d15..00000000000 --- a/React/Fabric/Utils/MainQueueExecutor.mm +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -#include "MainQueueExecutor.h" - -#include -#include - -namespace facebook { -namespace react { - -MainQueueExecutor &MainQueueExecutor::instance() -{ - static auto instance = folly::Indestructible{}; - return *instance; -} - -void MainQueueExecutor::add(folly::Func function) -{ - __block folly::Func blockFunction = std::move(function); - dispatch_async(dispatch_get_main_queue(), ^{ - blockFunction(); - }); -} - -} // namespace react -} // namespace facebook