测试已测试 | ✓ |
Lang语言 | Objective C++Objective C++ |
许可证 | MIT |
发布最后发布 | 2016年10月 |
由Games Neox维护。
依赖 | |
GNExceptions | >= 0 |
GNLog | >= 0 |
GNPreconditions | >= 0 |
为 Objective-C/Swift 设计的简单线程池。基本使用
#import <GNThreadPool/GNThreadPool.h>
GNThreadPool* threadPool = [[GNThreadPool alloc] initWithThreadsAmount:4 withPriority: GNThreadPriorityHigher];
[threadPool enqueue:^{
NSLog(@"in a separate thread");
}];
[threadPool clear];
import GNThreadPool
let threadPool = GNThreadPool(threadsAmount: 4, withPriority: .Higher)
threadPool.enqueue() {
NSLog("in a separate thread")
}
threadPool.clear()
灵感来自 Jakob Progsch,Václav Zeman,2012
要运行示例项目,首先克隆仓库,然后从 Example 目录中运行 pod install
最低支持的 iOS
版本:8.x
依赖项:GNExceptions
,GNLog
和 GNPreconditions
GNThreadPool 通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中
pod "GNThreadPool"
Games Neox,[email protected]
GNThreadPool 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。