//
//  MVMCoreDispatchUtility.h
//  MVMCore
//
//  Created by Pfeil, Scott Robert on 11/9/17.
//  Copyright © 2017 Verizon Wireless. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface MVMCoreDispatchUtility : NSObject

// Ensures the block is performed on the main thread.
+ (void)performBlockOnMainThread:(nonnull void (^)(void))block;
+ (void)performSyncBlockOnMainThread:(nonnull void (^)(void))block;

// Ensures the block is performed in the background.
+ (void)performBlockInBackground:(nonnull void (^)(void))block;
+ (void)performSyncBlockInBackground:(nonnull void (^)(void))block;

/// Ensures the block is peformed on the same *labeled* dispatch queue. The queue *must* be previously initialized with a unique label.
+ (void)performSyncBlock:(nonnull void (^)(void))block onQueue:(nonnull dispatch_queue_t)queue;

@end
