Listing 911 Moving processing to a background Thread Available for

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

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



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


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

Was this article helpful?

0 0
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