Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@guizmaii
Copy link
Member

@guizmaii guizmaii commented Dec 31, 2024

This PR targets this other PR: #9383

It's exploring the idea expressed here: #9383 (comment)

Let me know if you like the idea. I think it simplifies the code and removes some allocations, that's why I think it's worth it

@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_Result branch 2 times, most recently from 1503ddc to 7c2da21 Compare December 31, 2024 02:26
@guizmaii guizmaii marked this pull request as ready for review December 31, 2024 02:26
@guizmaii guizmaii changed the title Regis review: Prefer Result over Exit Regis' review: Prefer Result over Exit Dec 31, 2024
@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_Result branch 4 times, most recently from 847406d to cb692ba Compare December 31, 2024 04:22
@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_Result branch from cb692ba to af713d9 Compare December 31, 2024 04:23
@guizmaii guizmaii merged commit 0753ef3 into simplify_ZChannel_mergeAllWith Dec 31, 2024
15 checks passed
@guizmaii guizmaii deleted the simplify_ZChannel_mergeAllWith_Result branch December 31, 2024 04:27
@guizmaii
Copy link
Member Author

I merged because I think it's worth it.

guizmaii added a commit that referenced this pull request Dec 31, 2024
guizmaii added a commit that referenced this pull request Jan 7, 2025
guizmaii added a commit that referenced this pull request Jan 11, 2025
kyri-petrou added a commit that referenced this pull request Jan 18, 2025
* Simplify `zio.stream.ZChannel.mergeAllWith` code

* Review: Prefer `*>`

* Review: Remove as many `.map` and `.flatMap` calls as possible (#9387)

* Review: Remove as many `.map` calls as possible

* Update streams/shared/src/main/scala/zio/stream/ZChannel.scala

* Remove Option in `lastDone` `Ref`

* `SingleProducerAsyncInput.unsafe.make`

* `fiberIdWith`

* success first

* fmt

* Clean

* Regis review: Prefer `Exit` over `ZIO`

* Regis review: Prefer `Result` over `Exit` (#9445)

* Review: Remove `Result` methods

* Review: Remove `ZIO.suspendSucceed`

* Review: Prefer `AtomicReference`

* Review: Prefer `Unsafe`

* Review: Improve `zio.stream.internal.SingleProducerAsyncInput.unsafe.make`

* Fix tests

* Rollback `AtomicReference` change

* uninterruptible finalizers

* Fix imports

* clean code

* Fix wrong `.map` usage

* Put back `AtomicReference`

---------

Co-authored-by: kyri-petrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant