mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
ccb4a88742
git remote add ssk ../SignalServiceKit git remote update git merge -s ours --allow-unrelated-histories --no-commit ssk/master git read-tree --prefix=SignalServiceKit -u ssk/master git commit
48 lines
1 KiB
Objective-C
48 lines
1 KiB
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import "OWSDispatch.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@implementation OWSDispatch
|
|
|
|
+ (dispatch_queue_t)attachmentsQueue
|
|
{
|
|
static dispatch_once_t onceToken;
|
|
static dispatch_queue_t queue;
|
|
dispatch_once(&onceToken, ^{
|
|
queue = dispatch_queue_create("org.whispersystems.signal.attachments", NULL);
|
|
});
|
|
return queue;
|
|
}
|
|
|
|
+ (dispatch_queue_t)sessionStoreQueue
|
|
{
|
|
static dispatch_once_t onceToken;
|
|
static dispatch_queue_t queue;
|
|
dispatch_once(&onceToken, ^{
|
|
queue = dispatch_queue_create("org.whispersystems.signal.sessionStoreQueue", NULL);
|
|
});
|
|
return queue;
|
|
}
|
|
|
|
+ (dispatch_queue_t)sendingQueue
|
|
{
|
|
static dispatch_once_t onceToken;
|
|
static dispatch_queue_t queue;
|
|
dispatch_once(&onceToken, ^{
|
|
queue = dispatch_queue_create("org.whispersystems.signal.sendQueue", NULL);
|
|
});
|
|
return queue;
|
|
}
|
|
|
|
@end
|
|
|
|
void AssertIsOnMainThread() {
|
|
OWSCAssert([NSThread isMainThread]);
|
|
}
|
|
|
|
NS_ASSUME_NONNULL_END
|