-
Notifications
You must be signed in to change notification settings - Fork 82
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
Don't use value class Reset
with AtomicRef
#863
Conversation
if we have a breaking change here anyway, do we really need this wrapper around |
Probably not |
let me see what i can do then |
ok, so i kept |
dev.kord.rest.ratelimit.Reset
and replace it with plain Instant
can you take a look @DRSchlaubi? (can't request an review from you, you are the pr author) |
wait a second, i just noticed that we don't even have to change any public api, we can just box/unbox the |
dev.kord.rest.ratelimit.Reset
and replace it with plain Instant
Reset
with AtomicRef
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.
simply using the backing Instant
should do the job, what do you think @DRSchlaubi?
Looks good |
The use of value classes for the
Reset
class has already caused issues implementing #855. However, it was isolated to native platforms. Unfortunately, this behavior will become a compiler error soon, so we need to change it. This can be achieved by simply using the backingInstant
instead ofReset
withAtomicRef
.Related Issues
#855
#69
Kotlin/kotlinx-atomicfu#291
KT-61584