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

Skip to content

Conversation

@adrianfilip
Copy link
Contributor

No description provided.

@adrianfilip adrianfilip requested a review from iravid as a code owner July 30, 2020 19:54
@adrianfilip
Copy link
Contributor Author

This PR is for #3685

testM("foreachPar fail") {
val io = for {
trace <- TestClock.setTime(1.second) *> foreachParFail
trace <- TestClock.setTime(fromSeconds(1)) *> foreachParFail
Copy link
Member

Choose a reason for hiding this comment

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

Let's have extension methods in zio.duration._ so we can still use the same syntax as before. Will help ensure people don't have to change their code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, we can still use extension methods.

} @@ jvmOnly @@ zioTag(interruption),
testM("timeout in uninterruptible region") {
val effect = (ZIO.unit.timeout(Duration.Infinity)).uninterruptible
val effect = (ZIO.unit.timeout(zio.duration.infiniteDuration)).uninterruptible
Copy link
Member

Choose a reason for hiding this comment

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

We can still keep Duration.Infinity / etc. There can be a type alias Duration inside zio.duration which delegates to java.time.Duration, then there can be a companion object with vals inside it and helpers. So overall almost no code should change in user-land.

@adrianfilip
Copy link
Contributor Author

Closing this because I opened a new one: #4029

@adrianfilip
Copy link
Contributor Author

#4029

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