Skip to content
Cinch
Packages/cinch-async/Control.Task
SAMPLE API
MODULE REFERENCE

Control.Task

Tasks whose lifetime is bounded by a surrounding scope.

SYNOPSIS

Types and classes

Task

opaque Task scope a

A handle to a scoped computation. Its result can be joined once.

Functions and values

spawn

function§Source ↗
spawn :: forall a. (Unit ->{Io r} a) ->{Io r} Task scope a

Start a child computation in the current scope.

join

function§Source ↗
join :: forall a. Task scope a ->{Io r} a

Wait for a task and consume its result handle.