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

Skip to content

Conversation

@guizmaii
Copy link
Member

No description provided.

@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_0 branch from 85e41c5 to 5f71731 Compare December 10, 2024 23:53
@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_0 branch from 9b007ea to e8e9565 Compare December 11, 2024 00:02
val outgoing =
Queue.unsafe.bounded[ZIO[Env, Either[OutErr, OutDone], OutElem]](bufferSize0, fiberId)(Unsafe.unsafe)
val cancelers = Queue.unsafe.unbounded[Promise[Nothing, Unit]](fiberId)(Unsafe.unsafe)
val lastDone = Ref.unsafe.make[OutDone](null.asInstanceOf[OutDone])(Unsafe.unsafe)
Copy link
Member Author

@guizmaii guizmaii Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully, it's safe to null.asInstanceOf[OutDone] 🤔

Edit: Well, tests pass :)

@guizmaii guizmaii force-pushed the simplify_ZChannel_mergeAllWith_0 branch from e8e9565 to 5085cb2 Compare December 11, 2024 00:06
@guizmaii guizmaii requested a review from kyri-petrou December 11, 2024 00:27
@guizmaii guizmaii self-assigned this Dec 11, 2024
@guizmaii guizmaii changed the title Review: Remove as many .map calls as possible Review: Remove as many .map and .flatMap calls as possible Dec 11, 2024
@guizmaii guizmaii merged commit 8fe7c36 into simplify_ZChannel_mergeAllWith Dec 11, 2024
18 checks passed
@guizmaii guizmaii deleted the simplify_ZChannel_mergeAllWith_0 branch December 11, 2024 09:18
guizmaii added a commit that referenced this pull request Dec 31, 2024
* 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
guizmaii added a commit that referenced this pull request Jan 7, 2025
* 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
guizmaii added a commit that referenced this pull request Jan 11, 2025
* 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
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.

2 participants