GNThreadPool 0.4.0

GNThreadPool 0.4.0

测试已测试
Lang语言 Objective C++Objective C++
许可证 MIT
发布最后发布2016年10月

Games Neox维护。



 
依赖
GNExceptions>= 0
GNLog>= 0
GNPreconditions>= 0
 

  • 作者:
  • Games Neox

为 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
依赖项:GNExceptionsGNLogGNPreconditions

安装

GNThreadPool 通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中

pod "GNThreadPool"

作者

Games Neox,[email protected]

许可证

GNThreadPool 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。