type Future[+A] = future.OpaqueTypes.Future[A]
An asynchronous task.
- Source
- future.scala
- Note
Unlike scala.concurrent.Future, this Future is not memoized by default.
var count = 0 val notMemoized = Future.delay { count += 1 } count should be(0); ( for { _ <- notMemoized _ = count should be(1) _ <- notMemoized _ = count should be(2) _ <- notMemoized } yield (count should be(3)) ).toScalaFuture
,A Future can be memoized manually by converting this Future to a scala.concurrent.Future and then converting back.
var count = 0 val notMemoized = Future.delay { count += 1 } val memoized = notMemoized.toScalaFuture.toThoughtworksFuture; ( for { _ <- memoized _ = count should be(1) _ <- memoized _ = count should be(1) _ <- memoized } yield (count should be(1)) ).toScalaFuture
- See also
ParallelFuture for parallel version of this Future.
ThoughtworksFutureOps for methods available on this Future.
Ordering
- Alphabetic
Visibility
- Public
- All
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
equals(arg0: Any): Boolean
- Definition Classes
- Any
-
def
hashCode(): Int
- Definition Classes
- Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
toString(): String
- Definition Classes
- Any