Transducers.jl
Transducers.jl copied to clipboard
some transducers cause unexpected disorder with parallelism
Here's a neat trick
◖◗ a = 1:10^5 |> Enumerate() |> Map(x -> x[1]) |> tcollect;
◖◗ issorted(a)
false
I suppose it's up for debate whether this is really a "bug", but at best it's a spectacular foot-gun. At a bare minimum we should reconsider the documentation for transducers and parallelism (like adding a warning in the doc for Enumerate
), in the longer term maybe transducers should have some kind of expanded API to deal with cases like this.