A future that completes when the associated run has terminated.
Start the associated run and returns a Future that completes when the run terminates.
Start the associated run and returns a Future that completes when the run terminates. The returned Future is equivalent to the one returned by future.
Aborts the associated run.
Aborts the associated run.
There is no guarantee that the runner will be effectively terminated
by the time this method returns. If necessary, this call can be followed
by a call to await()
.
If the run has already completed, this does nothing. Similarly,
subsequent calls to stop()
will do nothing.
This method cannot be called before start()
has been called.
Await completion of the started Run for the duration specified
by atMost
.
Await completion of the started Run for the duration specified
by atMost
. Strictly equivalent to:
Await.result(future, atMost)
Await completion of the started Run.
Await completion of the started Run. Strictly equivalent to
Await.result(future, Duration.Inf)
Awaits completion of the started Run for the duration specified by
atMost
, or force it to stop.
Awaits completion of the started Run for the duration specified by
atMost
, or force it to stop.
If any exception is thrown while awaiting completion (including a
TimeoutException), forces the runner
to stop by calling stop()
before rethrowing the exception.
Strictly equivalent to:
try await(atMost) finally stop()
Checks whether this async runner is still running.
Checks whether this async runner is still running. Strictly equivalent to
!future.isCompleted