Files
flipper/iOS/SonarKit/FlipperUtil.m
Pritesh Nandgaonkar ab00f3360e Rename SonarUtil file and method to Flipper
Summary: Rename SonarUtil file and method to Flipper

Reviewed By: passy

Differential Revision: D9920194

fbshipit-source-id: 3d1e360ccce613b7fbba10fb6b1fcaf0f15442a7
2018-09-19 04:58:21 -07:00

19 lines
421 B
Objective-C

/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*
*/
#import <Foundation/Foundation.h>
#import "FlipperPlugin.h"
void FlipperPerformBlockOnMainThread(void(^block)())
{
if ([NSThread isMainThread]) {
block();
} else {
dispatch_async(dispatch_get_main_queue(), block);
}
}