effect-concurrency-fibers

Coordinate parallel tasks with bounded concurrency and structured fiber lifecycles.

5|Updated Nov 18, 2025
One-click install
npx skills add https://github.com/mepuka/effect-ontology --skill effect-concurrency-fibers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-concurrency-fibers
Source: https://github.com/mepuka/effect-ontology/tree/main/.claude/skills/effect-concurrency-fibers
Command: npx skills add https://github.com/mepuka/effect-ontology --skill effect-concurrency-fibers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Concurrency with Effect.all, forEach concurrency, Fiber lifecycle, race and timeouts. Use for parallelizing tasks safely.

Core Features & Use Cases

  • Parallel execution with all
  • Pooling with forEach concurrency
  • Fork/join interrupts for fibers and lifecycle management
  • Race and timeout patterns

Quick Start

Parallelize two independent tasks with Effect.all and limit concurrency with forEach.

Frequently Asked Questions about effect-concurrency-fibers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run multiple tasks in parallel with controlled concurrency in Effect?

Use Effect.all to execute independent tasks concurrently, or Effect.forEach with a concurrency option to limit parallelism. Both enforce bounded concurrency, preventing resource exhaustion while coordinating task execution safely across pools and API calls.

What are fibers and how do I manage their lifecycles?

Fibers are Effect's units of concurrent execution. Manage their lifecycles using fork to spawn parallel work, join to wait for completion, and interrupt to cancel tasks. This structured approach ensures safe cleanup and deterministic shutdown of background operations.

How do I implement race and timeout patterns with Effect?

Use Effect's race and timeout combinators to run competing tasks or enforce time limits on operations. These patterns integrate with fiber lifecycle management to safely interrupt slow or losing tasks, preventing indefinite hangs in latency-sensitive scenarios.

Can I use Effect concurrency for background task pools and streams?

Yes. Effect.forEach with concurrency bounds is designed for pooling and stream processing, safely parallelizing work across multiple tasks while maintaining latency control and preventing resource overload in continuous workflows.

What's the difference between Effect.all and forEach concurrency for parallel execution?

Effect.all coordinates fixed sets of independent tasks with optional concurrency limits. Effect.forEach applies the same concurrency bound across iterable collections. Choose all for discrete parallel work and forEach for batches or streams requiring uniform rate-limiting.

When should I use fiber interrupts instead of waiting for tasks to complete?

Use interrupts when you need deterministic cancellation—timeouts expire, a race winner emerges, or a user action cancels work. Interrupts ensure fibers clean up promptly without blocking, critical for responsive latency control and graceful degradation.