effect-io-ai

Package: effect
Module: Effect

Effect.yieldNow

Yields control back to the Effect runtime, allowing other fibers to execute.

Example (Yielding to other fibers)

import { Effect } from "effect"

const program = Effect.gen(function*() {
  console.log("Before yield")
  yield* Effect.yieldNow
  console.log("After yield")
})

Effect.runPromise(program)

Signature

declare const yieldNow: Effect<void, never, never>

Source

Since v2.0.0