Module: Ecoportal::API::GraphQL::Concerns::Threadable
- Included in:
- FileUpload::Client
- Defined in:
- lib/ecoportal/api/graphql/concerns/threadable.rb
Overview
Bounded-concurrency helpers for batch operations.
Ported from ecoportal-api-v2's Common::Concerns::Threadable rather than required
from it: that gem is being decommissioned, and this is exactly the kind of small,
stable primitive that should not create a new dependency on it.
new_thread keeps at most max threads alive by joining the oldest before starting
a new one — a deliberately simple back-pressure valve, not a pool. max: 1 runs
inline (no threads at all), which keeps single-file paths and specs deterministic.