process pool: unbounded mpsc channels give no backpressure
Open
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 17
Description
Came up while planning the optative-process-pool extraction.
Inbound `mpsc::Sender` and per-child outbound `mpsc::Sender>` are unbounded. A slow consumer of inbound stdout, or a fast producer of outbound stdin, will grow memory without bound.
`std::sync::mpsc::sync_channel(n)` (or `crossbeam-channel`) gives us backpressure for free. The only design choice is the default `n` and whether it's configurable per direction.
Drafted by Claude (AI assistant) during a design review.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.