class Concurrent::MutexAtomicFixnum

def value=(value)

Raises:
  • (ArgumentError) - if the new value is not a `Fixnum`

Returns:
  • (Fixnum) - the current value

Parameters:
  • value (Fixnum) -- the new value to be set
def value=(value)
  raise ArgumentError.new('value must be a Fixnum') unless value.is_a?(Fixnum)
  @mutex.lock
  result = @value = value
  @mutex.unlock
  result
end