本文介绍了NSOperationQueue对GCD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在什么情况下,您更喜欢使用 NSOperationQueue over GCD?

In what cases would you prefer to use NSOperationQueue over GCD?

我从这两个有限的经验,我认为与 NSOperationQueue 你基本上可以控制多少并发操作。

From my limited experience of these two, I take it that with NSOperationQueue you basically have control over how many concurrent operations there are.

对于GCD,你不能这样做,因为你正在使用队列。

With GCD you can't do this, since you are using a queue. Except you can somehow simulate this with a multi core processor, although still I think there's no way to control it.

推荐答案

<$

这篇关于NSOperationQueue对GCD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-19 00:58