From 8c7c93bf67fb369b22bd479a9f3a6142de33d0a4 Mon Sep 17 00:00:00 2001 From: ibireme Date: Wed, 16 Mar 2016 01:15:19 +0800 Subject: [PATCH] remove `YYDispatchQueuePool` due to dynamic library compile error. --- YYWebImage/Cache/YYMemoryCache.m | 9 --------- YYWebImage/YYImageCache.m | 11 ----------- YYWebImage/YYWebImageOperation.m | 7 ------- 3 files changed, 27 deletions(-) diff --git a/YYWebImage/Cache/YYMemoryCache.m b/YYWebImage/Cache/YYMemoryCache.m index 13f788d..5c078b2 100644 --- a/YYWebImage/Cache/YYMemoryCache.m +++ b/YYWebImage/Cache/YYMemoryCache.m @@ -15,19 +15,10 @@ #import #import -#if __has_include("YYDispatchQueuePool.h") -#import "YYDispatchQueuePool.h" -#endif -#ifdef YYDispatchQueuePool_h -static inline dispatch_queue_t YYMemoryCacheGetReleaseQueue() { - return YYDispatchQueueGetForQOS(NSQualityOfServiceUtility); -} -#else static inline dispatch_queue_t YYMemoryCacheGetReleaseQueue() { return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); } -#endif /** A node in linked map. diff --git a/YYWebImage/YYImageCache.m b/YYWebImage/YYImageCache.m index d433d6a..1549489 100644 --- a/YYWebImage/YYImageCache.m +++ b/YYWebImage/YYImageCache.m @@ -25,25 +25,14 @@ #import "YYCache.h" #endif -#if __has_include("YYDispatchQueuePool.h") -#import "YYDispatchQueuePool.h" -#endif static inline dispatch_queue_t YYImageCacheIOQueue() { -#ifdef YYDispatchQueuePool_h - return YYDispatchQueueGetForQOS(NSQualityOfServiceDefault); -#else return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); -#endif } static inline dispatch_queue_t YYImageCacheDecodeQueue() { -#ifdef YYDispatchQueuePool_h - return YYDispatchQueueGetForQOS(NSQualityOfServiceUtility); -#else return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); -#endif } diff --git a/YYWebImage/YYWebImageOperation.m b/YYWebImage/YYWebImageOperation.m index 6d81854..c226394 100644 --- a/YYWebImage/YYWebImageOperation.m +++ b/YYWebImage/YYWebImageOperation.m @@ -20,9 +20,6 @@ #import "YYImage.h" #endif -#if __has_include("YYDispatchQueuePool.h") -#import "YYDispatchQueuePool.h" -#endif #define MIN_PROGRESSIVE_TIME_INTERVAL 0.2 #define MIN_PROGRESSIVE_BLUR_TIME_INTERVAL 0.4 @@ -216,9 +213,6 @@ + (NSThread *)_networkThread { /// Global image queue, used for image reading and decoding. + (dispatch_queue_t)_imageQueue { -#ifdef YYDispatchQueuePool_h - return YYDispatchQueueGetForQOS(NSQualityOfServiceUtility); -#else #define MAX_QUEUE_COUNT 16 static int queueCount; static dispatch_queue_t queues[MAX_QUEUE_COUNT]; @@ -243,7 +237,6 @@ + (dispatch_queue_t)_imageQueue { if (cur < 0) cur = -cur; return queues[(cur) % queueCount]; #undef MAX_QUEUE_COUNT -#endif } - (instancetype)init {