Skip to main content
Module

x/effection/lib/shift-sync.ts>shiftSync

Structured concurrency and effects for JavaScript
Go to Latest
function shiftSync
import { shiftSync } from "https://deno.land/x/effection@3.0.0-beta.3/lib/shift-sync.ts";

Create a shift computation where the body of the shift can be resolved in a single step.

before:

yield* shift(function*(k) { return k; });

after: yield* shiftSync(k => k);

Parameters

block: (resolve: Continuation<T>, reject: Continuation<Error>) => void