Hyperlinkv0.8.0-beta.28

Cause

Cause.Interruptinterfaceeffect/Cause.ts:390
Interrupt

A fiber interruption signal, optionally carrying the ID of the fiber that initiated the interruption.

Details

Use isInterruptReason to narrow a Reason to this type.

Example (Accessing the fiber ID)

import { Cause } from "effect"

const cause = Cause.interrupt(123)
const reason = cause.reasons[0]
if (Cause.isInterruptReason(reason)) {
  console.log(reason.fiberId) // 123
}
Source effect/Cause.ts:3903 lines
export interface Interrupt extends Cause.ReasonProto<"Interrupt"> {
  readonly fiberId: number | undefined
}
Referenced by 5 symbols