Interface Task<T>
- Type Parameters:
T- result type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated.
Experimental API
Represents a possibly asynchronous unit of work, called "Task".
A Task is a function that takes an instance of Task.Complete and returns nothing.
Complete is a handler that needs to be actively called to complete the Task.
Callable<T> worker = ...;
Future<T> result = Future.run(complete -> complete.with(Try.of(worker::call)));
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDeprecated.Completes a task. -
Method Summary