mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 00:21:12 +00:00
19 lines
444 B
Objective-C
19 lines
444 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@interface SThreadPoolTask : NSObject
|
|
|
|
- (void)addDependency:(SThreadPoolTask *)task;
|
|
|
|
@end
|
|
|
|
@interface SThreadPool : NSObject
|
|
|
|
- (instancetype)initWithThreadCount:(NSUInteger)threadCount threadPriority:(double)threadPriority;
|
|
|
|
- (id)addTask:(void (^)(bool (^)()))task;
|
|
- (SThreadPoolTask *)prepareTask:(void (^)(bool (^)()))task;
|
|
- (id)startTask:(SThreadPoolTask *)task;
|
|
- (void)cancelTask:(id)taskId;
|
|
|
|
@end
|