Sha256: 1d516eab88c824d99648d948476a069a52325b12047821f1c1e43fef8ef9b42e

Contents?: true

Size: 1.51 KB

Versions: 261

Compression:

Stored size: 1.51 KB

Contents

require 'concurrent/collection/map/non_concurrent_map_backend'

module Concurrent

  # @!visibility private
  module Collection

    # @!visibility private
    class SynchronizedMapBackend < NonConcurrentMapBackend

      require 'mutex_m'
      include Mutex_m
      # WARNING: Mutex_m is a non-reentrant lock, so the synchronized methods are
      # not allowed to call each other.

      def [](key)
        synchronize { super }
      end

      def []=(key, value)
        synchronize { super }
      end

      def compute_if_absent(key)
        synchronize { super }
      end

      def compute_if_present(key)
        synchronize { super }
      end

      def compute(key)
        synchronize { super }
      end

      def merge_pair(key, value)
        synchronize { super }
      end

      def replace_pair(key, old_value, new_value)
        synchronize { super }
      end

      def replace_if_exists(key, new_value)
        synchronize { super }
      end

      def get_and_set(key, value)
        synchronize { super }
      end

      def key?(key)
        synchronize { super }
      end

      def delete(key)
        synchronize { super }
      end

      def delete_pair(key, value)
        synchronize { super }
      end

      def clear
        synchronize { super }
      end

      def size
        synchronize { super }
      end

      def get_or_default(key, default_value)
        synchronize { super }
      end

      private
      def dupped_backend
        synchronize { super }
      end
    end
  end
end

Version data entries

261 entries across 240 versions & 42 rubygems

Version Path
concurrent-ruby-1.1.10 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
phillipug-foodie-0.1.0 .vendor/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
vagrant-unbundled-2.2.19.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
vagrant-unbundled-2.2.18.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/collection/map/synchronized_map_backend.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb