Asynchronous vs Synchronous vs Threading in an iPhone App

后端 未结 8 1387
失恋的感觉
失恋的感觉 2021-01-30 05:28

I\'m in the design stage for an app which will utilize a REST web service and sort of have a dilemma in as far as using asynchronous vs synchronous vs threading. Here\'s the sce

8条回答
  •  既然无缘
    2021-01-30 06:12

    I personally look at what is being done, I will ususally use an asyc request to ensure that the UI doesn't block, however, I MAY during the course of that request disable the UI of my application.

    A prime example of this is in an application that I built with a "search" button. Once the search was triggered as an async request I would disable the button until the response came back, effectivly limiting the ability for the user to spawn a second asyc request.

    Doing this, at least I can prevent the need for priorites, granted this only works if you can in an easy to do way, limit your users to one action at a time.

提交回复
热议问题