Where will this AsyncTask run?
- by Binoy Babu
Say I have this code in the AlertDialog.Builder(context) of my application. The question is in which Thread will it run?
final Thread myPrettyOperation = new Thread() {
@Override
public void run() {
//Do some really long operation.
}
};
class MyPrettyTask extends
AsyncTask<Void, Integer, Boolean> {
protected Boolean doInBackground(
Void... voids) {
myPrettyOperation.start();
return true;
}
protected void onProgressUpdate(
Integer... progress) {
}
protected void onPostExecute(Boolean result) {
}
}
new MyPrettyTask().execute();