What is the maximum number of threads we can run i

2019-09-04 15:14发布

This question already has an answer here:

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条回答
冷血范
2楼-- · 2019-09-04 16:00

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.

查看更多
登录 后发表回答