Product Type

SpawnFrame

Describes the frame needed to spawn a computation.

Details

This object will be shared between the spawned computation (e.g., as it will store the result here), and the await call (e.g., to extract the result from here).

Members

Bindings

var f: [E] () let -> Int

Functions

fun await() -> Int { inout }

Awaits the result of the computation.

static fun allocate(_ f: sink [E] () let -> Int) -> PointerToMutable<SpawnFrame<E>>

Allocate an object of Self on the heap and initialize it with f.

Initializers

init(_ f: sink [E] () let -> Int)

Initializes self with f, and spawns the computation.