mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.0 KiB
Matlab
48 lines
1.0 KiB
Matlab
|
9 years ago
|
//
|
||
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
||
|
|
//
|
||
|
9 years ago
|
|
||
|
|
#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;
|
||
|
|
}
|
||
|
|
|
||
|
9 years ago
|
+ (dispatch_queue_t)sessionStoreQueue
|
||
|
9 years ago
|
{
|
||
|
|
static dispatch_once_t onceToken;
|
||
|
|
static dispatch_queue_t queue;
|
||
|
|
dispatch_once(&onceToken, ^{
|
||
|
9 years ago
|
queue = dispatch_queue_create("org.whispersystems.signal.sessionStoreQueue", NULL);
|
||
|
9 years ago
|
});
|
||
|
|
return queue;
|
||
|
|
}
|
||
|
|
|
||
|
9 years ago
|
+ (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
|
||
|
|
|
||
|
9 years ago
|
void AssertIsOnMainThread() {
|
||
|
|
OWSCAssert([NSThread isMainThread]);
|
||
|
|
}
|
||
|
|
|
||
|
9 years ago
|
NS_ASSUME_NONNULL_END
|