Files
SDWebImage/SDWebImage/Core/SDCallbackQueue.h
T
DreamPiggy 43ec4726e1 Added context option callbackQueue for advanced user to control which queue to callback
This is used for user who call SDWebImage outside from main queue and need precise queue control, such as avoid chain queue blocking (like AVKit lazy load)
2023-01-04 18:47:50 +08:00

33 lines
760 B
Objective-C

/*
* This file is part of the SDWebImage package.
* (c) Olivier Poitrey <rs@dailymotion.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
#import "SDWebImageDefine.h"
NS_ASSUME_NONNULL_BEGIN
@interface SDCallbackQueue : NSObject
@property (nonnull, class, readonly) SDCallbackQueue *mainQueue;
@property (nonnull, class, readonly) SDCallbackQueue *callerQueue;
@property (nonnull, class, readonly) SDCallbackQueue *globalQueue;
+ (SDCallbackQueue *)dispatchQueue:(dispatch_queue_t)queue;
- (void)sync:(SDWebImageNoParamsBlock)block;
- (void)async:(SDWebImageNoParamsBlock)block;
- (void)asyncSafe:(SDWebImageNoParamsBlock)block;
@end
NS_ASSUME_NONNULL_END