YYDispatchQueuePool alternatives and similar libraries
Based on the "GCD" category.
Alternatively, view YYDispatchQueuePool alternatives based on common mentions on social networks and blogs.
-
Async
Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch -
Queuer
Queuer is a queue manager, built on top of OperationQueue and Dispatch (aka GCD). -
Dispatch
Just a tiny library to make using GCD easier and intuitive -
AlecrimAsyncKit
Bringing async and await to Swift world with some flavouring. -
GrandSugarDispatch
Syntactic sugar for Grand Central Dispatch (GCD)
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of YYDispatchQueuePool or a related project?
README
YYDispatchQueuePool
iOS utility class to manage global dispatch queue. (It's a component of YYKit)
When use a concurrent queue to execute lots of blocks, I met this problem in some situation:
When some block is locked, the concurrent queue may create lots of thread and may block the main thread. Use a global serial queue pool to avoid it.
Usage
// Get a serial queue from global queue pool
dispatch_queue_t queue = YYDispatchQueueGetForQOS(NSQualityOfServiceUtility);
// Create a serial queue pool
YYDispatchQueuePool *pool = [[YYDispatchQueuePool alloc] initWithName:@"file.read" queueCount:5 qos:NSQualityOfServiceBackground];
dispatch_queue_t queue = [pool queue];
Installation
CocoaPods
- Add
pod 'YYDispatchQueuePool'
to your Podfile. - Run
pod install
orpod update
. - Import <YYDispatchQueuePool/YYDispatchQueuePool.h>.
Carthage
- Add
github "ibireme/YYDispatchQueuePool"
to your Cartfile. - Run
carthage update --platform ios
and add the framework to your project. - Import <YYDispatchQueuePool/YYDispatchQueuePool.h>.
Manually
- Download all the files in the YYDispatchQueuePool subdirectory.
- Add the source files to your Xcode project.
- Import
YYDispatchQueuePool.h
.
Documentation
Full API documentation is available on CocoaDocs. You can also install documentation locally using appledoc.
Requirements
This library requires iOS 6.0+
and Xcode 8.0+
.
License
YYDispatchQueuePool is provided under the MIT license. See LICENSE file for details.
中文介绍
iOS 全局并发队列管理工具。 (该项目是 YYKit 组件之一)
当用 concurrent queue 来执行大量 block 时,有时会遇到下面这种情况:
当某个 block 所在线程被锁住时,concurrent queue 会创建大量线程以至于占用了过多资源而影响到主线程。这里可以用一个全局的 serial queue pool 来尽量控制全局线程数。
用法
// 从全局的 queue pool 中获取一个 queue
dispatch_queue_t queue = YYDispatchQueueGetForQOS(NSQualityOfServiceUtility);
// 创建一个新的 serial queue pool
YYDispatchQueuePool *pool = [[YYDispatchQueuePool alloc] initWithName:@"file.read" queueCount:5 qos:NSQualityOfServiceBackground];
dispatch_queue_t queue = [pool queue];
安装
CocoaPods
- 在 Podfile 中添加
pod 'YYDispatchQueuePool'
。 - 执行
pod install
或pod update
。 - 导入 <YYDispatchQueuePool/YYDispatchQueuePool.h>。
Carthage
- 在 Cartfile 中添加
github "ibireme/YYDispatchQueuePool"
。 - 执行
carthage update --platform ios
并将生成的 framework 添加到你的工程。 - 导入 <YYDispatchQueuePool/YYDispatchQueuePool.h>。
手动安装
- 下载 YYDispatchQueuePool 文件夹内的所有内容。
- 将 YYDispatchQueuePool 内的源文件添加(拖放)到你的工程。
- 导入
YYDispatchQueuePool.h
。
文档
你可以在 CocoaDocs 查看在线 API 文档,也可以用 appledoc 本地生成文档。
系统要求
该项目最低支持 iOS 6.0
和 Xcode 8.0
。
许可证
YYDispatchQueuePool 使用 MIT 许可证,详情见 LICENSE 文件。
相关文章
*Note that all licence references and agreements mentioned in the YYDispatchQueuePool README section above
are relevant to that project's source code only.