Fix the wrong declaration of SDCallbackQueue's block, should be escaping to match GCD block

This may cause the wrong lifecycle for block (earily release)
This commit is contained in:
DreamPiggy 2023-02-21 19:12:12 +08:00
parent 554e05a441
commit 5bb64eae39
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);