1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-03 09:57:46 +01:00
Telegram/Telegraph/ATQueue.h

26 lines
640 B
C
Raw Normal View History

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