-
Notifications
You must be signed in to change notification settings - Fork 420
Description
Ruby has deprecated the Fixnum class in favour of a more generic Integer class (example blog post). The class Concurrent::AtomicFixnum
still uses the Fixnum limits. This means the maximum value of this class depends on the architecture of the system.
At least when using MRI this doesn't make much sense anymore (not sure about C extensions, JRuby or Rubinius). It looks pretty trivial to create a AtomicInteger
object, just remove the call to NativeInteger.ensure_integer_and_bounds
. It could get min
and max
keyword arguments to specify new limits (which would make it possible to create a nAtomicFixnum
based on AtomicInteger
with the current boundaries and remove the code duplication)
I think it's pretty simple trivial to implement, so if the team agrees to this I'm willing to create the pull request for it