Now that the iPad 2 comes with two CPU cores, the debugging of threading issues will be more important than ever. Now I'm wondering: Does the iOS-Simulator actually use the multiple cores available on the Mac?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
To run iOS programs on the simulator, Xcode compiles your program for the Intel processor. The simulator does not emulate an ARM processor, so exact execution of threaded code will differ from an iOS device and the simulator. Regardless of how many cores the iOS simulator uses, threaded code execution may vary greatly between the ARM processors in iOS devices and the Intel processor running on the Mac. Therefore any issues that crop up due to the multicore iPad 2 processor may or may not show up in the simulator.
In other words, you'll want to debug such issues on the iPad 2, not the simulator, so it doesn't matter how many cores the simulator uses.
回答2:
I created a special test app for you. And here is the result: