测试已测试 | ✓ |
Lang语言 | SwiftSwift |
许可证 | MIT |
发布上次发布 | Nov 2017 |
SwiftSwift 版本 | 4.0 |
SPM支持 SPM | ✗ |
由 Mikhail Akopov 维护。
一个简单的工具,用于处理当
class SomeClass {
// Define input and output types
private var qwolm: Qwolm<Int, Int>!
init() {
// Initialize with a task and a completion handler
qwolm = Qwolm(task: complexTask) { output in
print(output)
}
}
// This function gets called very often
func execute(input: Int) {
qwolm.execute(input: input)
}
// A difficult task that takes a long time
private func complexTask(input: Int, completion: @escaping (Int) -> Void) {
let output = input + 1
completion(output)
}
}
要运行示例项目,请克隆仓库,并首先从 Example 目录中运行 pod install
。
Qwolm 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod 'Qwolm'
然后运行 pod install
。
Mikhail Akopov, [email protected]
Qwolm 基于 MIT 许可证可用。有关更多信息,请参阅 LICENSE 文件。