BindSuspend

case
class BindSuspend[A, B](thunk: () => Future[A], f: A => Future[B]) extends Future[B]
trait Serializable
trait Product
trait Equals
class Future[B]
class Object
trait Matchable
class Any

Value members

Inherited methods

def after(t: Long): Future[B]
Inherited from
Future
def after(t: Duration): Future[B]

Returns a Future that delays the execution of this Future by the duration t.

Returns a Future that delays the execution of this Future by the duration t.

Inherited from
Future
def flatMap[B](f: B => Future[B]): Future[B]
Inherited from
Future
def map[B](f: B => B): Future[B]
Inherited from
Future
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product
@tailrec
final
def step: Future[B]

Evaluate this Future to a result, or another asynchronous computation. This has the effect of stripping off any 'pure' trampolined computation at the start of this Future.

Evaluate this Future to a result, or another asynchronous computation. This has the effect of stripping off any 'pure' trampolined computation at the start of this Future.

Inherited from
Future
@tailrec
final
def stepInterruptibly(cancel: AtomicBoolean): Future[B]

Like step, but may be interrupted by setting cancel to true.

Like step, but may be interrupted by setting cancel to true.

Inherited from
Future
def timed(timeout: Duration)(implicit scheduler: ScheduledExecutorService): Future[Throwable \/ B]
Inherited from
Future
def timed(timeoutInMillis: Long)(implicit scheduler: ScheduledExecutorService): Future[Throwable \/ B]

Returns a Future which returns a TimeoutException after timeoutInMillis, and attempts to cancel the running computation. This implementation will not block the future's execution thread

Returns a Future which returns a TimeoutException after timeoutInMillis, and attempts to cancel the running computation. This implementation will not block the future's execution thread

Inherited from
Future
def unsafePerformAsync(cb: B => Unit): Unit

Run this Future, passing the result to the given callback once available. Any pure, non-asynchronous computation at the head of this Future will be forced in the calling thread. At the first Async encountered, control switches to whatever thread backs the Async and this function returns.

Run this Future, passing the result to the given callback once available. Any pure, non-asynchronous computation at the head of this Future will be forced in the calling thread. At the first Async encountered, control switches to whatever thread backs the Async and this function returns.

Inherited from
Future
def unsafePerformAsyncInterruptibly(cb: B => Unit, cancel: AtomicBoolean): Unit

Run this computation to obtain an A, so long as cancel remains false. Because of trampolining, we get frequent opportunities to cancel while stepping through the trampoline, this should provide a fairly robust means of cancellation.

Run this computation to obtain an A, so long as cancel remains false. Because of trampolining, we get frequent opportunities to cancel while stepping through the trampoline, this should provide a fairly robust means of cancellation.

Inherited from
Future
def unsafePerformListen(cb: B => Trampoline[Unit]): Unit

Run this computation to obtain an A, then invoke the given callback. Also see unsafePerformAsync.

Run this computation to obtain an A, then invoke the given callback. Also see unsafePerformAsync.

Inherited from
Future
def unsafePerformListenInterruptibly(cb: B => Trampoline[Unit], cancel: AtomicBoolean): Unit

Run this computation to obtain an A, so long as cancel remains false. Because of trampolining, we get frequent opportunities to cancel while stepping through the trampoline, so this should provide a fairly robust means of cancellation.

Run this computation to obtain an A, so long as cancel remains false. Because of trampolining, we get frequent opportunities to cancel while stepping through the trampoline, so this should provide a fairly robust means of cancellation.

Inherited from
Future

Run this Future and block awaiting its result.

Run this Future and block awaiting its result.

Inherited from
Future
def unsafePerformSyncAttemptFor(timeout: Duration): Throwable \/ B
Inherited from
Future
def unsafePerformSyncAttemptFor(timeoutInMillis: Long): Throwable \/ B

Like unsafePerformSyncFor, but returns TimeoutException as left value. Will not report any other exceptions that may be raised during computation of A

Like unsafePerformSyncFor, but returns TimeoutException as left value. Will not report any other exceptions that may be raised during computation of A

Inherited from
Future
def unsafePerformSyncFor(timeout: Duration): B
Inherited from
Future
def unsafePerformSyncFor(timeoutInMillis: Long): B

Run this Future and block until its result is available, or until timeoutInMillis milliseconds have elapsed, at which point a TimeoutException will be thrown and the Future will attempt to be canceled.

Run this Future and block until its result is available, or until timeoutInMillis milliseconds have elapsed, at which point a TimeoutException will be thrown and the Future will attempt to be canceled.

Inherited from
Future

Begins running this Future and returns a new future that blocks waiting for the result. Note that this will start executing side effects immediately, and is thus morally equivalent to unsafePerformIO. The resulting Future cannot be rerun to repeat the effects.

Begins running this Future and returns a new future that blocks waiting for the result. Note that this will start executing side effects immediately, and is thus morally equivalent to unsafePerformIO. The resulting Future cannot be rerun to repeat the effects.

Use with care.

Inherited from
Future

Deprecated and Inherited methods

@deprecated("use unsafePerformSyncAttemptFor", "7.2")
def attemptRunFor(timeout: Duration): Throwable \/ B
Deprecated
Inherited from
Future
@deprecated("use unsafePerformSyncAttemptFor", "7.2")
def attemptRunFor(timeoutInMillis: Long): Throwable \/ B
Deprecated
Inherited from
Future
@deprecated("use unsafePerformListen", "7.2")
def listen(cb: B => Trampoline[Unit]): Unit
Deprecated
Inherited from
Future
@deprecated("use unsafePerformListenInterruptibly", "7.2")
def listenInterruptibly(cb: B => Trampoline[Unit], cancel: AtomicBoolean): Unit
Deprecated
Inherited from
Future
@deprecated("use unsafePerformSync", "7.2")
def run: B
Deprecated
Inherited from
Future
@deprecated("use unsafePerformAsync", "7.2")
def runAsync(cb: B => Unit): Unit
Deprecated
Inherited from
Future
@deprecated("use unsafePerformAsyncInterruptibly", "7.2")
def runAsyncInterruptibly(cb: B => Unit, cancel: AtomicBoolean): Unit
Deprecated
Inherited from
Future
@deprecated("use unsafePerformSyncFor", "7.2")
def runFor(timeout: Duration): B
Deprecated
Inherited from
Future
@deprecated("use unsafePerformSyncFor", "7.2")
def runFor(timeoutInMillis: Long): B
Deprecated
Inherited from
Future
@deprecated("use unsafeStart", "7.2")
def start: Future[B]
Deprecated
Inherited from
Future
@deprecated("use timed", "7.2")
def unsafePerformTimed(timeoutInMillis: Long)(implicit scheduler: ScheduledExecutorService): Future[Throwable \/ B]
Deprecated
Inherited from
Future
@deprecated("use timed", "7.2")
def unsafePerformTimed(timeout: Duration)(implicit scheduler: ScheduledExecutorService): Future[Throwable \/ B]
Deprecated
Inherited from
Future