Promise

scala.concurrent.Promise$
See thePromise companion trait
object Promise

Attributes

Companion:
trait
Source:
Promise.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Promise.type

Members list

Concise view

Value members

Concrete methods

final def apply[T](): Promise[T]

Creates a promise object which can be completed with a value.

Creates a promise object which can be completed with a value.

Attributes

T

the type of the value in the promise

Returns:

the newly created Promise instance

Source:
Promise.scala
final def failed[T](exception: Throwable): Promise[T]

Creates an already completed Promise with the specified exception.

Creates an already completed Promise with the specified exception.

Attributes

T

the type of the value in the promise

Returns:

the newly created Promise instance

Source:
Promise.scala
final def fromTry[T](result: Try[T]): Promise[T]

Creates an already completed Promise with the specified result or exception.

Creates an already completed Promise with the specified result or exception.

Attributes

T

the type of the value in the promise

Returns:

the newly created Promise instance

Source:
Promise.scala
final def successful[T](result: T): Promise[T]

Creates an already completed Promise with the specified result.

Creates an already completed Promise with the specified result.

Attributes

T

the type of the value in the promise

Returns:

the newly created Promise instance

Source:
Promise.scala