Transducers.jl icon indicating copy to clipboard operation
Transducers.jl copied to clipboard

some transducers cause unexpected disorder with parallelism

Open ExpandingMan opened this issue 10 months ago • 0 comments

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.

ExpandingMan avatar Apr 17 '24 14:04 ExpandingMan