Add addOperationWithBlock: to NSOperationQueue

This commit is contained in:
Gregory John Casamento 2019-08-02 13:29:42 -04:00
parent 88dd60a8fc
commit 2553b6d56d
2 changed files with 13 additions and 2 deletions

View file

@ -674,6 +674,13 @@ static NSOperationQueue *mainQueue = nil;
[internal->lock unlock];
}
- (void) addOperationWithBlock: (GSBlockOperationBlock)block
{
NSBlockOperation *bop = [NSBlockOperation blockOperationWithBlock: block];
[self addOperation: bop];
}
- (void) addOperations: (NSArray *)ops
waitUntilFinished: (BOOL)shouldWait
{