Hyperlinkv0.8.0-beta.28

Cause

Cause.makeInterruptReasonconsteffect/Cause.ts:617
(fiberId?: number | undefined): Interrupt

Creates a standalone Interrupt reason (not wrapped in a Cause), optionally carrying the interrupting fiber's ID.

When to use

Use when constructing a standalone interrupt reason for fromReasons or direct comparison.

Example (Creating an Interrupt reason)

import { Cause } from "effect"

const reason = Cause.makeInterruptReason(42)
console.log(reason._tag) // "Interrupt"
console.log(reason.fiberId) // 42
Source effect/Cause.ts:6171 lines
export const makeInterruptReason: (fiberId?: number | undefined) => Interrupt = effect.makeInterruptReason
Referenced by 1 symbols