swift-async-algorithms icon indicating copy to clipboard operation
swift-async-algorithms copied to clipboard

Merge provides all elements from the subsequences on cancellation

Open fabianfett opened this issue 2 years ago • 5 comments
trafficstars

On cancellation, merge currently does not yield all elements. This leads to situations in which the final elements of AsyncStreams are not forwarded to the user. This patch ensures, that only the underlying Task is cancelled and all subsequences' elements are forwarded to the user.

fabianfett avatar Jul 11 '23 14:07 fabianfett

We should apply the same to zip, debounce and co

FranzBusch avatar Jul 11 '23 15:07 FranzBusch

@swift-ci please test

phausler avatar Aug 11 '23 19:08 phausler

@phausler, @FranzBusch is there anything outstanding? Can we merge this?

fabianfett avatar Aug 18 '23 07:08 fabianfett

@swift-ci please test

fabianfett avatar Aug 18 '23 08:08 fabianfett

This looks good from my side. The CI failure is due to a broken nightly toolchain. @phausler If you are happy please merge it.

FranzBusch avatar Aug 18 '23 09:08 FranzBusch