File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -619,14 +619,12 @@ - (void) main
619619
620620@interface NSOperationQueue (Private)
621621- (void ) _execute;
622- - (void ) _main: (NSOperation *)op;
623- #if GS_USE_LIBDISPATCH == 1
624622- (id ) _initMainQueue;
625- #endif
626623- (NSRecursiveLock *) _internalLock;
627624- (NSMutableArray *) _internalOperations;
628625- (NSMutableArray *) _internalWaiting;
629626- (NSInteger *) _internalExecutingPtr;
627+ - (void ) _main: (NSOperation *)op;
630628
631629- (void ) observeValueForKeyPath: (NSString *)keyPath
632630 ofObject: (id )object
@@ -1216,6 +1214,18 @@ - (void) waitUntilAllOperationsAreFinished
12161214
12171215@implementation NSOperationQueue (Private)
12181216
1217+ - (id ) _initMainQueue
1218+ {
1219+ if ((self = [self init ]) != nil )
1220+ {
1221+ [internal->lock lock ];
1222+ internal->maxThreads = 1 ;
1223+ [internal->queueImpl initAsMainQueue ];
1224+ [internal->lock unlock ];
1225+ }
1226+ return self;
1227+ }
1228+
12191229- (NSRecursiveLock *) _internalLock
12201230{
12211231 return internal->lock ;
You can’t perform that action at this time.
0 commit comments