This method is use to run a specific code at the background which has loop or some complicated statements. This will show the pop that how many iterations have been completed so that the user can be notified.
So I created a app which collects the total number of dies rotated and the probability for each number is displayed. In case of very few number of dies rotated, async task is not useful. But in case of large numbers, it is recommended.

As the above picture, number of process executed will be shown to the user. Without this method, the number of process executed will not be shown to the user. As it takes long time, the user may close the app without getting the result.