Posts tagged " Parallel Programming "

Parallel (mis)Adventures

August 18th, 2017 Posted by Embarcadero 5 comments

In one of our customer projects, we had an Android app that was receiving broadcasts on a background thread (I’ll call this the Receiver thread). On receipt of a message, the Receiver thread┬áneeded to do some processing on that message and then update the main thread (the UI thread).

The initial solution to this was pretty simple, call TThread.Synchronize from the Receiver thread, passing in an anonymous method that updates the UI Thread.

Testing this on Windows worked fine, however running it on Android revealed a problem. (more…)