Can an Android AsyncTask doInBackground be synchronized to serialize the task execution?
问题 Is it possible to make AsyncTask.doInBackground synchronized - or achieve the same result in another way? class SynchronizedTask extends AsyncTask { @Override protected synchronized Integer doInBackground(Object... params) { // do something that needs to be completed // before another doInBackground can be called } } In my case, any AsyncTask.execute() can be started before a previous one has completed, but I need to execute the code in doInBackground only after the previous task has finished