-
Couldn't load subscription status.
- Fork 1.4k
3685: Remove zio's Duration and replace it with java.time.Duration #4026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
This PR is for #3685 |
| testM("foreachPar fail") { | ||
| val io = for { | ||
| trace <- TestClock.setTime(1.second) *> foreachParFail | ||
| trace <- TestClock.setTime(fromSeconds(1)) *> foreachParFail |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
|
Closing this because I opened a new one: #4029 |
No description provided.