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

Skip to content

Conversation

@kyri-petrou
Copy link
Contributor

I'm not entirely sure why ZIO.done exists in the first place; my guess is that it's a hangover back from a time that Exit didn't extend ZIO and had to be lifted into one instead.

In any way, this PR removes all internal usages of ZIO.done (which are surprisingly many) to avoid the additional allocations and runtime loop iterations

Copy link
Collaborator

@hearnadam hearnadam left a comment

Choose a reason for hiding this comment

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

Can we also deprecate ZIO.done?

@kyri-petrou
Copy link
Contributor Author

kyri-petrou commented Dec 3, 2024

Can we also deprecate ZIO.done?

@hearnadam good point - done. Initially I thought there might be users that want to suspend a method that produces an Exit, but they can easily use ZIO.suspendSucceed for that

@kyri-petrou kyri-petrou merged commit ea009da into zio:series/2.x Dec 3, 2024
18 checks passed
@kyri-petrou kyri-petrou deleted the remove-zio-done-usages branch December 3, 2024 10:00
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