Synchronize Or Queue UI Updates In Tasks With Delphi XE7 Firemonkey On Android And IOS

Delphi XE7 Firemonkey Synchronize And Queue TasksDeveloper Malcolm Groves from Embarcadero has a blog post up with some code showing how to update your app UI from Tasks in Delphi XE7 Firemonkey. Basically Tasks use threads to get things done and you can no update the UI from a thread without causing problems. The solution for this is to use either TThread.Synchronize or TThread.Queue. What these two functions do is run the function that you pass to them in the main thread. The Synchronize function runs it in the main thread now blocking it and the Queue function with run the function at some time in the future and will not block the main thread. The blog post also has an embedded video which is a thirty minute plus tutorial on using Tasks, Futures, and parallel programming in your apps. The goal with using all of these threads, async anonymous functions, tasks, and futures is to keep your app responsive so that the user isn’t waiting needlessly. This information applies to apps for Android, IOS, OSX, and Windows. It should also compile under Appmethod.

Head over and check out the full blog post about synchronizing tasks on the main UI thread and then watch the video for in-depth parallel programming info.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Synchronize Or Queue UI Updates In Tasks With Delphi XE7 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE7 Firemonkey Custom Sort String Object List
Easily Sort String Lists And Objects With CustomSort In Delphi XE7 Firemonkey On Android And IOS

It is simple to sort a list of strings or objects in Object Pascal using TStringList from Delphi XE7 Firemonkey....

Close