O'Reilly logo

Delphi Cookbook - Second Edition by Daniele Teti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Do not block the main thread!

Long requests to external systems such as storage, databases, hardware, and networks have always been difficult to handle from a user experience point of view. For the programmers, it is simple to run the long request and, when finished (after seconds, minutes, or hours), inform the user that their data is there. However, we should care about user experience even more in the mobile world.

Getting ready

If your app runs a long-running request and the UI is frozen, the user might think that something is going wrong and start to tap here and there to try to unblock the app. After some seconds, either the operating system itself will close the app, or the user will push the Home button to close your app and then, usually, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required