Listing 911 Moving processing to a background Thread Available for

download on // This method is called on the main GUI thread. Wrox.com private void mainProcessing() {

// This moves the time consuming operation to a child thread. Thread thread = new Thread(null, doBackgroundThreadProcessing,

"Background");

thread.start();

// Runnable that executes the background processing method. private Runnable doBackgroundThreadProcessing = new Runnable() { public void run() {

backgroundThreadProcessing();

// Method which does some processing in the background. private void backgroundThreadProcessing() { [ ... Time consuming operations ... ]

Mobile Apps Made Easy

Mobile Apps Made Easy

Quick start guide to skyrocket your offline and online business success with mobile apps. If you know anything about mobile devices, you’ve probably heard that famous phrase coined by one of the mobile device’s most prolific creators proclaiming that there’s an app for pretty much everything.

Get My Free Training Guide


Post a comment