MCPcopy Create free account
hub / github.com/Effect-TS/effect / suspend

Function suspend

packages/effect/src/unstable/workflow/Workflow.ts:856–861  ·  view source on GitHub ↗
(instance: WorkflowInstance["Service"])

Source from the content-addressed store, hash-verified

854 * @since 4.0.0
855 */
856export const suspend = (instance: WorkflowInstance["Service"]): Effect.Effect<never> =>
857 Effect.interruptible(Effect.callback<never>(() => {
858 instance.suspended = true
859 const fiber = Fiber.getCurrent()!
860 fiber.interruptUnsafe(fiber.id)
861 }))
862
863/**
864 * Captures defects for a workflow and includes them in the result of the workflow or its activities.

Callers 9

failCauseSyncFunction · 0.50
failSyncFunction · 0.50
try_Function · 0.50
genFunction · 0.50
fnUntracedFunction · 0.50
makeFnFunction · 0.50
fromIteratorEagerUnsafeFunction · 0.50
effect.tsFile · 0.50
goFunction · 0.50

Calls 1

interruptUnsafeMethod · 0.80

Tested by

no test coverage detected