Tag: future api


  • 1. Future cancel() API The Future.cancel() method takes one argument of typeboolean boolean cancel(boolean mayInterruptIfRunning); Depending on the value of mayInterruptIfRunning and the status of the task submitted to the executor, the behavior of this method is different: If the task has been completed or has been canceled earlier, or it can’t be cancelled due to any other reason, the…