Is there a particular reason why `AtomicInt` from ...
# coroutines
d
Is there a particular reason why
AtomicInt
from kotlinx:atomicfu doesn't declare these:
operator fun plusAssign
(+=)
operator fun minusAssign
(-=)
operator fun inc
(++)
operator fun dec
(--) In Java, these couldn't be atomic, but since you can implement them yourself, they would be. For
inc
and
dec
I guess it might be because they would have to return AtomicInt, instead of Int. Asking here because I didn't see an atomicfu channel.
maybe there should be incAssign then 😂
alright, so it wouldn't work for those. Maybe that's a reason not to do it for the other two.
I know kotlinfu as used extensively by the coroutines library, I didn't find something more adequate.