nushell/crates/nu-command/src/system
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
..
benchmark.rs Add pipeline redirection support (#4594) 2022-02-21 17:22:21 -05:00
complete.rs Fix external extra (#4777) 2022-03-07 20:17:33 -05:00
exec.rs Do not pass non-string env vars to externals (#4748) 2022-03-12 00:18:39 +02:00
mod.rs Add support for stderr and exit code (#4647) 2022-02-25 14:51:31 -05:00
ps.rs fix typo, update some examples and regenerate docs (#4718) 2022-03-04 06:10:09 -06:00
run_external.rs Limit mem usage + back-pressure via bounded channels (#4986) 2022-03-27 15:34:34 +13:00
sys.rs add more examples to the sys command (#4491) 2022-02-15 21:06:38 -08:00
which_.rs Fix reporting of which and $nu.scope (#4836) 2022-03-13 21:32:46 +02:00