Sha256: c24188f4b3577040ca63a38b87833d3c97a73876d2aef02e3fad5c4f94d0dccf

Contents?: true

Size: 629 Bytes

Versions: 9

Compression:

Stored size: 629 Bytes

Contents

# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
# frozen_string_literal: true

require 'monitor'

module Contrast
  module Agent
    module Reporting
      module Client
        # Common methods for Client interface.
        class InterfaceBase
          # Execute calls to connection with thread safety.
          def with_monitor &block
            monitor.synchronize(&block)
          end

          private

          # @return [Monitor]
          def monitor
            @_monitor ||= Monitor.new
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
contrast-agent-7.6.1 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.6.0 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.5.0 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.4.1 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.4.0 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.3.2 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.3.1 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.3.0 lib/contrast/agent/reporting/client/interface_base.rb
contrast-agent-7.2.0 lib/contrast/agent/reporting/client/interface_base.rb