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

Skip to content

Conversation

@vasilmkd
Copy link
Contributor

@vasilmkd vasilmkd commented Nov 9, 2019

case None => Pull.end
}
)
done <- Ref.make(false).toManaged_
Copy link
Member

Choose a reason for hiding this comment

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

So we can use Pull.memoizeEnd here right?

Pull.memoizeEnd {
  Ref.make(s).toManaged_.map {
    // previous code here
  }
}

@vasilmkd
Copy link
Contributor Author

I started disliking memoizeEnd because it also captures the error, so it's not completely correct in this case. We should resume normally after a potential error in f0, not end.

@iravid
Copy link
Member

iravid commented Nov 10, 2019

So let's fix it, by not capturing the error, or delete it?

@vasilmkd
Copy link
Contributor Author

I vote for deleting

@vasilmkd vasilmkd requested a review from iravid November 10, 2019 11:52
@iravid iravid merged commit 4e391cb into zio:master Nov 10, 2019
@vasilmkd vasilmkd deleted the zstream-unfold-safe branch November 10, 2019 20:16
Twizty pushed a commit to Twizty/zio that referenced this pull request Nov 13, 2019
…o#2199)

* Check that ZStream.unfold is safe to pull again

* Make ZStream.unfoldM safe to pull again

* Adjust ZStream.unfold test

* Remove StreamEffect.memoizeEnd

* Remove ZStream.Pull.memoizeEnd
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