kantord / kantord/optative

process pool: unbounded mpsc channels give no backpressure

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.