File tree 1 file changed +4
-9
lines changed
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 23
23
24
24
@interface EDQueue ()
25
25
26
- @property (nonatomic , readwrite , nullable ) NSString *activeJobTag;
26
+ @property (nonatomic , nullable ) NSString *activeJobTag;
27
+ @property (nonatomic ) dispatch_queue_t dispatchQueue;
27
28
28
29
@end
29
30
@@ -49,6 +50,7 @@ - (instancetype)initWithPersistentStore:(id<EDQueuePersistentStorage>)persistent
49
50
self = [super init ];
50
51
if (self) {
51
52
_storage = persistentStore;
53
+ self.dispatchQueue = dispatch_queue_create (" edqueue.serial" , DISPATCH_QUEUE_SERIAL);
52
54
}
53
55
return self;
54
56
}
@@ -176,14 +178,7 @@ - (void)empty
176
178
*/
177
179
- (void )tick
178
180
{
179
- static dispatch_once_t onceToken;
180
- static dispatch_queue_t gcd;
181
-
182
- dispatch_once (&onceToken, ^{
183
- gcd = dispatch_queue_create (" edqueue.serial" , DISPATCH_QUEUE_SERIAL);
184
- });
185
-
186
- dispatch_barrier_async (gcd, ^{
181
+ dispatch_barrier_async (self.dispatchQueue , ^{
187
182
188
183
if (!self.isRunning ) {
189
184
return ;
You can’t perform that action at this time.
0 commit comments