블로그 이미지
SuperMjs

calendar

1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30

Notice

// Main thread calls a this method
private void mainProcessing(){
// This code moves the task needs time to child thread
Thread thread = new Thread(null, doBackgroundThreadProcess,"background");
thread.start();
}


// This Runnable execute the function to run in background
private Runnable doBackgroundThread = new Runnable(){
public void run(){
backgroundThreadProcess();
}
};

// function to run in background
private void backgroundThreadProcess(){
// Task
}
posted by SuperMjs