"OnPostExecute method" for some heavy UI task in Android?

i am using mapbox maps sdk in android and updating the UI with (1000+)markers at some interval of time.By updating i mean (removing all the markers and then again placing with new data).But sometimes when the removal process of marker is not finished,my function starts overwriting the marker again which throws the error as marker is already present. Is there any method by which track the complition of my UI task??just like onPostExecute is for AsyncTask. I just want to trigger my marker placing function after removing all old markers.