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

Function runSyncExit

packages/effect/src/Micro.ts:4290–4295  ·  view source on GitHub ↗
(effect: Micro<A, E>)

Source from the content-addressed store, hash-verified

4288 * @category execution
4289 */
4290export const runSyncExit = <A, E>(effect: Micro<A, E>): MicroExit<A, E> => {
4291 const scheduler = new MicroSchedulerDefault()
4292 const fiber = runFork(effect, { scheduler })
4293 scheduler.flush()
4294 return fiber._exit ?? exitDie(fiber)
4295}
4296
4297/**
4298 * Attempt to execute the `Micro` effect synchronously and return the success

Callers 1

runSyncFunction · 0.70

Calls 3

flushMethod · 0.95
runForkFunction · 0.70
exitDieFunction · 0.70

Tested by

no test coverage detected