blob: 194dfa9cfb95b59a56929c87bd9e295b34ef6726 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "QueueHelper.h"
@implementation QueueHelper
+ (void)ensureToRunOnMainQueue:(void (^)(void))block {
if (!NSThread.isMainThread) {
dispatch_async(dispatch_get_main_queue(), block);
} else {
block();
}
}
@end