Loading...
Loading...
Concurrency with Effect.all, forEach concurrency, Fiber lifecycle, race and timeouts. Use for parallelizing tasks safely.
npx skill4agent add mepuka/effect-ontology effect-concurrency-fibersconst results = yield* Effect.all(tasks, { concurrency: 10 })const processed = yield* Effect.forEach(items, processItem, { concurrency: 5 })const fiber = yield* Effect.fork(work)
const value = yield* Fiber.join(fiber)
yield* Fiber.interrupt(fiber)const fastest = yield* Effect.race(slow, fast)
const withTimeout = yield* Effect.timeout(operation, "5 seconds")forkEffect.allEffect.forEachconcurrencydocs/effect-source/docs/effect-source/effect/src/Effect.tsdocs/effect-source/effect/src/Fiber.tsdocs/effect-source/effect/src/Duration.ts# Find Effect.all and concurrency patterns
grep -F "Effect.all" docs/effect-source/effect/src/Effect.ts
# Find forEach with concurrency
grep -rF "forEach" docs/effect-source/effect/src/ | grep -F "concurrency"
# Study Fiber lifecycle operations
grep -F "export" docs/effect-source/effect/src/Fiber.ts | grep -E "fork|join|interrupt"
# Find race and timeout implementations
grep -F "race" docs/effect-source/effect/src/Effect.ts
grep -F "timeout" docs/effect-source/effect/src/Effect.tsdocs/effect-source/effect/src/Effect.ts