Swiftgram/SSignalKit/SThreadPool.h
2015-01-31 02:39:38 +03:00

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