RunnableFuture

  • RunnableFuture combines the capabilities of Runnable and Future, allowing an asynchronous computation to be executed and its result retrieved.

  • Running the run() method marks the Future as complete and makes its result accessible.

  • RunnableFuture supports cancellation and provides methods to check completion status and retrieve results.

  • Key implementations include FutureTask and RunnableScheduledFuture.

public interface RunnableFuture implements Runnable Future<V>
Known Indirect Subclasses

A Future that is Runnable. Successful execution of the run method causes completion of the Future and allows access to its results.

Public Method Summary

abstract void
run()
Sets this Future to the result of its computation unless it has been cancelled.

Inherited Method Summary

Public Methods

public abstract void run ()

Sets this Future to the result of its computation unless it has been cancelled.