Merge pull request #3500 from dreampiggy/bugfix/sd_callbackqueue_escaping

Fix the wrong declaration of SDCallbackQueue's block, should be escaping to match GCD block
This commit is contained in:
DreamPiggy 2023-02-21 21:09:42 +08:00 committed by GitHub
commit 011fe74031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -45,10 +45,10 @@ typedef NS_ENUM(NSUInteger, SDCallbackPolicy) {
/// Submits a block for execution and returns after that block finishes executing.
/// - Parameter block: The block that contains the work to perform.
- (void)sync:(nonnull NS_NOESCAPE dispatch_block_t)block;
- (void)sync:(nonnull dispatch_block_t)block;
/// Schedules a block asynchronously for execution.
/// - Parameter block: The block that contains the work to perform.
- (void)async:(nonnull NS_NOESCAPE dispatch_block_t)block;
- (void)async:(nonnull dispatch_block_t)block;
@end

View File

@ -79,7 +79,7 @@ static void inline SDSafeExecute(dispatch_queue_t _Nonnull queue, dispatch_block
return queue;
}
- (void)sync:(nonnull NS_NOESCAPE dispatch_block_t)block {
- (void)sync:(nonnull dispatch_block_t)block {
switch (self.policy) {
case SDCallbackPolicySafeExecute:
SDSafeExecute(self.queue, block, NO);
@ -93,7 +93,7 @@ static void inline SDSafeExecute(dispatch_queue_t _Nonnull queue, dispatch_block
}
}
- (void)async:(nonnull NS_NOESCAPE dispatch_block_t)block {
- (void)async:(nonnull dispatch_block_t)block {
switch (self.policy) {
case SDCallbackPolicySafeExecute:
SDSafeExecute(self.queue, block, YES);