What is the maximum number of threads we can run in NSOperationQueue simultaneously [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-25 04:49:54

问题


It is always being asked in interview how many maximum threads we can run in ios iphone programming simultaneously in NSOperationQueue and through GCD async?

Please explain the answer.


回答1:


You should be using NSOperationQueueDefaultMaxConcurrentOperationCount when you create your operations to let the OS decide the maximum number of operations - it will decide this based on the hardware available and system resources. The number will of course vary depending on device.



来源:https://stackoverflow.com/questions/32023212/what-is-the-maximum-number-of-threads-we-can-run-in-nsoperationqueue-simultaneou

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!