2014-07-10 16:11:09 +02:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2015-10-01 18:19:52 +02:00
|
|
|
typedef enum {
|
|
|
|
ATQueuePriorityLow,
|
|
|
|
ATQueuePriorityDefault,
|
|
|
|
ATQueuePriorityHigh
|
|
|
|
} ATQueuePriority;
|
2014-07-10 16:11:09 +02:00
|
|
|
|
|
|
|
@interface ATQueue : NSObject
|
|
|
|
|
|
|
|
+ (ATQueue *)mainQueue;
|
2015-10-01 18:19:52 +02:00
|
|
|
+ (ATQueue *)concurrentDefaultQueue;
|
|
|
|
+ (ATQueue *)concurrentBackgroundQueue;
|
2014-07-10 16:11:09 +02:00
|
|
|
|
|
|
|
- (instancetype)init;
|
|
|
|
- (instancetype)initWithName:(NSString *)name;
|
2015-10-01 18:19:52 +02:00
|
|
|
- (instancetype)initWithPriority:(ATQueuePriority)priority;
|
2014-07-10 16:11:09 +02:00
|
|
|
|
|
|
|
- (void)dispatch:(dispatch_block_t)block;
|
|
|
|
- (void)dispatch:(dispatch_block_t)block synchronous:(bool)synchronous;
|
|
|
|
- (void)dispatchAfter:(NSTimeInterval)seconds block:(dispatch_block_t)block;
|
|
|
|
|
|
|
|
- (dispatch_queue_t)nativeQueue;
|
|
|
|
|
|
|
|
@end
|