Update the coderQueue QoS based on SDWebImageDownloaderLowPriority && SDWebImageDownloaderHighPriority
This commit is contained in:
parent
3d1280315b
commit
13d0e739fb
|
@ -208,8 +208,13 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||
if (self.dataTask) {
|
||||
if (self.options & SDWebImageDownloaderHighPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityHigh;
|
||||
self.coderQueue.qualityOfService = NSQualityOfServiceUserInteractive;
|
||||
} else if (self.options & SDWebImageDownloaderLowPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityLow;
|
||||
self.coderQueue.qualityOfService = NSQualityOfServiceBackground;
|
||||
} else {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityDefault;
|
||||
self.coderQueue.qualityOfService = NSQualityOfServiceDefault;
|
||||
}
|
||||
[self.dataTask resume];
|
||||
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
|
||||
|
|
Loading…
Reference in New Issue