ITask¶
-
public interface
ITask
<T>¶ Interface for asynchronous task with cancellation.
Parameters: - <T> – Type of the result.
Methods¶
block¶
-
ITask<T>
block
()¶ Blocks until the task has been completed or cancelled, and return itself.
Throws: - InterruptedException – When the task has been cancelled while blocking.
cancel¶
-
void
cancel
(int forceTimeout)¶ Request cancellation, force cancel after after
stopTimeout
milliseconds.Parameters: - forceTimeout – Timeout in milliseconds after which the cancellation is forced.