Elixir and Erlang/OTP versions
Erlang/OTP 25 [erts-13.1.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]
Elixir 1.14.3 (compiled with Erlang/OTP 25)
Operating system
x86_64 GNU/Linux
Current behavior
When executed, the line below consumes all memory:
[] |> Stream.zip() |> Enum.to_list()
A less nasty way to check is to run the following while monitoring ram/cpu:
spawn(fn ->
:timer.kill_after(3000)
[] |> Stream.zip() |> Enum.to_list()
IO.puts("done")
end)
Expected behavior
When "materialized", Stream.zip([]) should not cause a memory spike and just be the empty list.
[] == [] |> Stream.zip() |> Enum.to_list()