android - cancel AsyncTask class in onPostExecute -


i'm inspecting other's code. , have seen there.

@override     protected void onpostexecute(autobookmarkinfo result) {         super.onpostexecute(result);          // computation...          if (setautobookmarktask != null) {             setautobookmarktask.cancel(false);             setautobookmarktask = null;         }      } 

setautobookmarktask - instance of asynctask class. please, explains why guy tries cancel working thread when work have been done ?

setautobookmarktask.cancel(false) doesnot mean anything. if need interrupt or cancel async task have pass true in argument.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -