SuspensionBase

continuations4s.Continuations.SuspensionBase
trait SuspensionBase[-T, +R]

The delimited continuation suspension interface. Represents a suspended computation asking for a value of type T to continue (and eventually returning a value of type R, which is the result that the whole delimited continuation will eventually produce).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def resume(arg: T): Continuations.this.Boundary[R]

Resume the suspended computation with arg.

Resume the suspended computation with arg.

Value parameters

arg

the value to resume the suspended computation with, which is the value that the suspended computation is asking for.

Attributes

Returns

the rest of the computation, i.e., the result that the whole delimited continuation will eventually produce, after resuming with arg

def resumeAndForget(arg: T): Unit

A variant of resume that doesn't wait for the result of the boundary.

A variant of resume that doesn't wait for the result of the boundary.

Attributes

def resumeAsFuture(arg: T)(using ExecutionContext): Future[R]

The return of resume being platform-specific, this variant is useful for abstracting over platform-specific code, e.g., testing.

The return of resume being platform-specific, this variant is useful for abstracting over platform-specific code, e.g., testing.

It can also make resume safer, because it forces an asynchronous boundary.

Attributes