JuliaFolds / Transducers.jl

Efficient transducers for Julia
https://juliafolds.github.io/Transducers.jl/dev/
MIT License
433 stars 24 forks source link

`channel_unordered` adds to full channels #534

Closed ExpandingMan closed 1 year ago

ExpandingMan commented 1 year ago

channel_unordered is somehow ignoring channel size limits. You get non-sensical results like

Channel{Any}(2) (6 items available)

This is easy to reproduce with e.g. channel_unordered(Map(f), 1:10, size=3). The created Channel object indeed seems to have the correct size it's just storing more output than it should be able to.

ExpandingMan commented 1 year ago

Sorry this is not a bug, put! can't sync across threads... it's very weird that Base doesn't throw an error when you try to do this with channels but I guess it doesn't have any way of knowing what's going on.