effect-ts-concurrency
Effect-TS Concurrency
Overview
Effect-TS provides lightweight fibers for high-performance concurrency. The core principle is explicit control: always bound parallelism to prevent resource exhaustion.
When to Use
- Processing large arrays of effects (e.g.,
Effect.all,Effect.forEach) - Rate limiting external API calls or database connections
- Coordinating work between background processes (fibers)
- Signaling completion or state changes across different parts of the app
When NOT to use:
- Simple sequential operations
- When standard
Promise.allis sufficient (though Effect is usually preferred for consistency)
Core Pattern: Bounded Parallelism
Unbounded parallelism is the most common source of "Too many open files" or "Connection timeout" errors.
More from mrevanzak/effect-ts-skills
effect-ts-fundamentals
Use when implementing type-safe, composable, and testable applications using Effect-TS, specifically for service definition, dependency injection, and sequential async logic.
63effect-ts-errors
Use when implementing error handling, validation logic, or custom error types in Effect-TS.
61effect-ts-resources
Use when managing resource lifecycles (DB connections, file handles, sockets) where cleanup must be guaranteed despite failures, interruptions, or potential resource leaks.
61effect-ts-anti-patterns
Use when reviewing Effect-TS code, debugging unexpected crashes, or optimizing concurrent operations.
61