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
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/concurrent-ruby-1.2.2/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
concurrent-ruby-1.2.2 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
concurrent-ruby-1.2.1 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/concurrent-ruby-1.2.0/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
concurrent-ruby-1.2.0 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/concurrent-ruby-1.1.10/lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
o-concurrent-ruby-1.1.13 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
o-concurrent-ruby-1.1.12 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb
o-concurrent-ruby-1.1.11 lib/concurrent-ruby/concurrent/collection/map/synchronized_map_backend.rb