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
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb