mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-01 10:23:15 +00:00
Make shared CA transaction queue variable extern so it's actually shared (#1397)
This commit is contained in:
parent
5490d4d1fa
commit
abe46b08a9
@ -68,13 +68,14 @@ AS_SUBCLASSING_RESTRICTED
|
||||
|
||||
@end
|
||||
|
||||
extern ASCATransactionQueue *_ASSharedCATransactionQueue;
|
||||
extern dispatch_once_t _ASSharedCATransactionQueueOnceToken;
|
||||
|
||||
NS_INLINE ASCATransactionQueue *ASCATransactionQueueGet(void) {
|
||||
static ASCATransactionQueue *q;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
q = [[ASCATransactionQueue alloc] init];
|
||||
dispatch_once(&_ASSharedCATransactionQueueOnceToken, ^{
|
||||
_ASSharedCATransactionQueue = [[ASCATransactionQueue alloc] init];
|
||||
});
|
||||
return q;
|
||||
return _ASSharedCATransactionQueue;
|
||||
}
|
||||
|
||||
@interface ASDeallocQueue : NSObject
|
||||
|
@ -354,6 +354,9 @@ ASSynthesizeLockingMethodsWithMutex(_internalQueueLock)
|
||||
// but after most other scheduled work on the runloop has processed.
|
||||
static int const kASASCATransactionQueueOrder = 1000000;
|
||||
|
||||
ASCATransactionQueue *_ASSharedCATransactionQueue;
|
||||
dispatch_once_t _ASSharedCATransactionQueueOnceToken;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user