class Concurrent::Synchronization::AbstractLockableObject

@!visibility private

def ns_broadcast

Other tags:
    Note: - to provide direct access to this method in a descendant add method
    Note: - only to be used inside synchronized block

Returns:
  • (self) -
def ns_broadcast
  raise NotImplementedError
end

def ns_signal

Other tags:
    Note: - to provide direct access to this method in a descendant add method
    Note: - only to be used inside synchronized block

Returns:
  • (self) -
def ns_signal
  raise NotImplementedError
end

def ns_wait(timeout = nil)

Other tags:
    Note: - to provide direct access to this method in a descendant add method
    Note: - only to be used inside synchronized block

Returns:
  • (self) -

Parameters:
  • timeout (Numeric, nil) -- in seconds, `nil` means no timeout
def ns_wait(timeout = nil)
  raise NotImplementedError
end

def ns_wait_until(timeout = nil, &condition)

Other tags:
    Note: - to provide direct access to this method in a descendant add method
    Note: - only to be used inside synchronized block

Returns:
  • (true, false) - if condition met

Other tags:
    Yieldreturn: -

Other tags:
    Yield: - condition to be met

Parameters:
  • timeout (Numeric, nil) -- in seconds, `nil` means no timeout
def ns_wait_until(timeout = nil, &condition)
  if timeout
    wait_until = Concurrent.monotonic_time + timeout
    loop do
      now = Concurrent.monotonic_time
      condition_result = condition.call
      return condition_result if now >= wait_until || condition_result
      ns_wait wait_until - now
    end
  else
    ns_wait timeout until condition.call
    true
  end
end

def synchronize

Other tags:
    Note: - can by made public in descendants if required by `public :synchronize`

Other tags:
    Yield: - runs the block synchronized against this object,
def synchronize
  raise NotImplementedError
end