Back Pressure
Basically, a program illustrating the back pressure problem mentioned in http://erlang.org/pipermail/erlang-questions/2014-November/081843.html
Run it using erl +S1 -noshell -eval 'back_pressure:main(0), halt(0).
. In htop
, it shows unbounded memory grow (due to the growing of unbounded
mailbox). Nonsuprisingly, after removing sleep
, the memeory stays constant.
1 | -module(back_pressure). |