Top Description Interfaces Annotations Classes
module io.vavr

Package io.vavr.concurrent


This package contains basic building blocks for creating fast, asynchronous, non-blocking parallel code.

A io.vavr.concurrent.Future represents an asynchronous task. It is a placeholder for a value that becomes available at some point. With the help of Future we efficiently perform many non-blocking operations in parallel. The value of a Future is supplied concurrently and can subsequently be used. Multiple concurrent tasks represented by Futures can be composed to a single Future.

Interface Summary

Modifier and TypeInterface and Description
public interface
Future<
Type of the computation result.
T
>

A Future is a computation result that becomes available at some point.

public interface
Promise<
The result type of the underlying Future.
T
>

A Promise is a write-once wrapper around a read-only Future which can complete the underlying Future with a value or an exception.

public interface
Task<
result type
T
>

Deprecated Experimental API
Represents a possibly asynchronous unit of work, called "Task".

Annotation Summary

Modifier and TypeAnnotation and Description
pack-priv @interface

Class Summary

Modifier and TypeClass and Description
pack-priv class
FutureImpl<
Result of the computation.
T
>

INTERNAL API - This class is subject to change.

pack-priv class
PromiseImpl<
result type
T
>

Internal Promise implementation.