session-ios/SignalServiceKit/src/Util/OWSAsserts.m

17 lines
304 B
Objective-C
Executable File

//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSAsserts.h"
NS_ASSUME_NONNULL_BEGIN
void SwiftAssertIsOnMainThread(NSString *functionName)
{
if (![NSThread isMainThread]) {
OWSCFail(@"%@ not on main thread", functionName);
}
}
NS_ASSUME_NONNULL_END