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

Skip to content

Conversation

@guizmaii
Copy link
Member

Idea comes from @hearnadam's review in this PR: #9556

…when possible

Idea comes from @hearnadam's review in this PR: #9556
shutdownFlag.set(true)
ZIO
.whenZIO(shutdownHook.succeed(())) {
.whenZIO(shutdownHook.succeedUnit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Bit outside the scope of this PR, but since we're at it, you can use whenZIODiscard to avoid the Some allocation and the FlatMap below from calling unit

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. I also used ZIO.foreachParDiscard

shutdownFlag.set(true)
ZIO
.whenZIO(shutdownHook.succeed(())) {
.whenZIO(shutdownHook.succeedUnit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

As above

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@guizmaii guizmaii merged commit af113d8 into series/2.x Feb 10, 2025
16 checks passed
@guizmaii guizmaii deleted the fix_review branch February 10, 2025 07:49
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