HaltStrategyRepresents strategies for halting merged channels when one completes or fails.
Example (Choosing merge halt strategies)
import type { Channel } from "effect"
// Different halt strategies for channel merging
const leftFirst: Channel.HaltStrategy = "left" // Stop when left channel halts
const rightFirst: Channel.HaltStrategy = "right" // Stop when right channel halts
const both: Channel.HaltStrategy = "both" // Stop when both channels halt
const either: Channel.HaltStrategy = "either" // Stop when either channel haltsmodels
Source effect/Channel.ts:60991 lines
export type type HaltStrategy =
| "left"
| "right"
| "both"
| "either"
Represents strategies for halting merged channels when one completes or fails.
Example (Choosing merge halt strategies)
import type { Channel } from "effect"
// Different halt strategies for channel merging
const leftFirst: Channel.HaltStrategy = "left" // Stop when left channel halts
const rightFirst: Channel.HaltStrategy = "right" // Stop when right channel halts
const both: Channel.HaltStrategy = "both" // Stop when both channels halt
const either: Channel.HaltStrategy = "either" // Stop when either channel halts
HaltStrategy = "left" | "right" | "both" | "either"Referenced by 2 symbols