Skip to content

Commit

Permalink
remove YYDispatchQueuePool due to dynamic library compile error.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibireme committed Mar 15, 2016
1 parent a64f0e6 commit fd0c7ae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
9 changes: 0 additions & 9 deletions YYText/Utility/YYTextAsyncLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,9 @@
#import "YYTextAsyncLayer.h"
#import <libkern/OSAtomic.h>

#if __has_include("YYDispatchQueuePool.h")
#import "YYDispatchQueuePool.h"
#else
#import <libkern/OSAtomic.h>
#endif

/// Global display queue, used for content rendering.
static dispatch_queue_t YYTextAsyncLayerGetDisplayQueue() {
#ifdef YYDispatchQueuePool_h
return YYDispatchQueueGetForQOS(NSQualityOfServiceUserInitiated);
#else
#define MAX_QUEUE_COUNT 16
static int queueCount;
static dispatch_queue_t queues[MAX_QUEUE_COUNT];
Expand All @@ -47,7 +39,6 @@ static dispatch_queue_t YYTextAsyncLayerGetDisplayQueue() {
if (cur < 0) cur = -cur;
return queues[(cur) % queueCount];
#undef MAX_QUEUE_COUNT
#endif
}

static dispatch_queue_t YYTextAsyncLayerGetReleaseQueue() {
Expand Down
12 changes: 1 addition & 11 deletions YYText/YYLabel.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,12 @@
#import "YYTextWeakProxy.h"
#import "YYTextUtilities.h"
#import "NSAttributedString+YYText.h"

#if __has_include("YYDispatchQueuePool.h")
#import "YYDispatchQueuePool.h"
#else
#import <libkern/OSAtomic.h>
#endif

#ifdef YYDispatchQueuePool_h
static dispatch_queue_t YYLabelGetReleaseQueue() {
return YYDispatchQueueGetForQOS(NSQualityOfServiceUtility);
}
#else

static dispatch_queue_t YYLabelGetReleaseQueue() {
return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0);
}
#endif


#define kLongPressMinimumDuration 0.5 // Time in seconds the fingers must be held down for long press gesture.
Expand Down

3 comments on commit fd0c7ae

@ex3ndr
Copy link

@ex3ndr ex3ndr commented on fd0c7ae Mar 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that your queue is no longer best option?

@ibireme
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I just want to avoid compile error.

@ibireme
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use a simple inner queue pool instead.

Please sign in to comment.