Does it make sense to do multithreading on the iPhone?

I'm not sure, but the iPhone doesn't have a multi-core processor. Does it really make sense to put an effort into multithreading, or is it just a waste of time?

I'm making heavy stuff that allows my entire UI to freeze until it's over. Now this stuff seems so heavy that it just sucks up all the CPU power. Does the solution impose any solution to at least quickly switch between the two processes - heavy stuff and responsive user experience?

+2


source to share


3 answers


Yes, it makes sense to have multiple threads. Especially if you are doing any I / O (disk, network) your application will be much more responsive if you don't block while waiting for input or output.



Even if your CPU, if 100% is consumed by your application, the UI will still be responsive and not freeze if you are doing heavy computation on a separate thread.

+7


source


You don't need multiple cores to use multithreading (multithreading was much longer than multicore processors).

This will allow you to run processes in the background to keep your UI responsive, resulting in a better user experience with your application.



... so yeah, put in the effort for multithreading.

+2


source


Yes, because you never know, at some point there might be a multi-core processor on the iPhone (if not now) and your app will support it ....;)

+1


source







All Articles