nushell/crates/nu-command
Andrew Barnes 91e17d2f9f
Limit mem usage + back-pressure via bounded channels (#4986)
Prior to this change, a pipeline of externals would result in high memory
usage if any of the producers in the chain, produced data faster than
the consumers.

For example a pipeline:

  > fast-producer | slow-consumer

Would cause a build up of `Value::{String,Binary}`'s in the mpsc channels
between each command as values are added to the channels faster than they
are consumed, eventually OOM'ing depnding on system resources, the volume
of data and speed diff. between fast v's slow.

This change replaces the unbounded channels with bounded channels
to limit the number of values that can build up and providing
back-pressure to limit ram usage.
2022-03-27 15:34:34 +13:00
..
assets Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
src Limit mem usage + back-pressure via bounded channels (#4986) 2022-03-27 15:34:34 +13:00
tests Fix single quote environment values (#4960) 2022-03-26 09:14:48 +13:00
build.rs Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
Cargo.toml Termux/Android target support for v0.60.0 (#4956) 2022-03-27 07:21:19 +13:00