1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-02 09:27:55 +01:00
Telegram/Telegraph/ATQueue.h
2015-10-01 19:19:52 +03:00

26 lines
640 B
Objective-C

#import <Foundation/Foundation.h>
typedef enum {
ATQueuePriorityLow,
ATQueuePriorityDefault,
ATQueuePriorityHigh
} ATQueuePriority;
@interface ATQueue : NSObject
+ (ATQueue *)mainQueue;
+ (ATQueue *)concurrentDefaultQueue;
+ (ATQueue *)concurrentBackgroundQueue;
- (instancetype)init;
- (instancetype)initWithName:(NSString *)name;
- (instancetype)initWithPriority:(ATQueuePriority)priority;
- (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