iOS多任务有哪些方法
iOS 主流多任务框架 有那些?
Uncommon used
- 线程 NSThread
- unix线程 pthread
推荐使用 Common Use
-
GCD Grand Central Dispatch 大中枢派发
- 1、DispatchQueue更加底层,块添加到分派队列后无法取消 - 2、分派队列-DispatchQueue 将Block块添加到分派队列DispatchQueue - 3、可以做到NSoperation办不到到事: dispatch_after 支持调度下一个操作到开始时间,而不是直接进入睡眠 使用纳秒,针对硬件到优化 -
操作 NSOperationQueue--使用GCD框架的ObjC封装
- 1、NSOperation可以在队列queue中使用优先级、调整Operation的次序 - 2、操作队列-OperationQueue 将NSOperation 添加到 NSOperationQueue
名词解释
- https://www.jianshu.com/p/2d57c72016c6 // 详细解释
- https://segmentfault.com/a/1190000016966955 //代码多 *
- https://developer.apple.com/library/archive/documentation/General/Conceptual/ConcurrencyProgrammingGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008091
- 分派屏障:dispatch_barrier_async
- 分派组 dispatch_group_t
浙公网安备 33010602011771号