You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove unused index variable from producer-consumer queue
The index was being created, enqueued, and then ignored in the writer.
There's no ordering logic that uses it - the queue itself maintains
FIFO order.
Changes:
- Remove `each_with_index` in build_producer_tasks (use `map`)
- Enqueue chunks directly instead of `[idx, chunk]` pairs
- Remove destructuring in build_writer_task
- Simplify variable names (pair -> chunk, item -> chunk)
Benefits:
- Cleaner code
- Slight performance improvement (no array allocation per chunk)
- Removes misleading code (index suggested ordering logic that didn't exist)
Verified: All 21 tests in stream_spec.rb still pass.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments