Fabric: Removing MainQueueExecutor

Summary: We don't need it anymore because we don't use folly::Future.

Reviewed By: JoshuaGross

Differential Revision: D15344961

fbshipit-source-id: a368e600d69e6879f6a98b4a997de85c71186e92
This commit is contained in:
Valentin Shergin
2019-05-14 19:52:17 -07:00
committed by Facebook Github Bot
parent 5bb2277245
commit b241bc2d0b
4 changed files with 0 additions and 55 deletions
@@ -15,7 +15,6 @@
#import <react/imagemanager/ImageRequest.h>
#import <react/imagemanager/RCTImagePrimitivesConversions.h>
#import "MainQueueExecutor.h"
#import "RCTConversions.h"
@implementation RCTImageComponentView {
@@ -13,8 +13,6 @@
#import <react/components/slider/SliderComponentDescriptor.h>
#import <react/components/slider/SliderLocalData.h>
#import "MainQueueExecutor.h"
using namespace facebook::react;
@implementation RCTSliderComponentView {
-21
View File
@@ -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 <folly/Executor.h>
namespace facebook {
namespace react {
class MainQueueExecutor : public folly::Executor {
public:
static MainQueueExecutor &instance();
void add(folly::Func function) override;
};
} // namespace react
} // namespace facebook
-31
View File
@@ -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 <dispatch/dispatch.h>
#include <folly/Indestructible.h>
namespace facebook {
namespace react {
MainQueueExecutor &MainQueueExecutor::instance()
{
static auto instance = folly::Indestructible<MainQueueExecutor>{};
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