Closed deneuxj closed 9 months ago
I think this is a sensible optimization. I haven't thought through all of the edge cases though.
Since this was merged back in Jan, 2019, this issue can now be closed? @eulerfx, @dsyme, @enricosada, @panesofglass (sorry to ping you all, perhaps you guys can add me to maintainers? I'd like to do some, ehrm, maintenance here)?
@abelbraaksma I will ad you to maintainers :)
Thanks @dsyme!
Description
I noticed that when multiple consumers use a cached AsyncSeq, the late ones delay reading cached items until the lead consumer receives a new item.
Repro steps
See the change to AsyncSeqTests.fs at https://github.com/fsprojects/FSharp.Control.AsyncSeq/pull/94/files
Expected behavior
Second consumer should take close to no time to read all 5 cached items
Actual behavior
Second consumer can't proceed and read cached items until the first consumer has received the next, most recent item.
Known workarounds
None
Related information
Problem observed on .net 4.5 and .net core 2.0 on master. Also observed with NuGet package 2.0.21 with .net 4.5
See https://github.com/fsprojects/FSharp.Control.AsyncSeq/pull/94 for a suggested fix and test case.