Sha256: 71b96cdf70d78359f479fed7c0451d550fb5cab8f08a6e48ae289f8ac7c49fd8

Contents?: true

Size: 348 Bytes

Versions: 104

Compression:

Stored size: 348 Bytes

Contents

module ThreadSafe
  describe Hash do 
    let!(:hsh) { described_class.new }

    it 'concurrency' do
      (1..THREADS).map do |i|
        Thread.new do
          1000.times do |j|
            hsh[i * 1000 + j] = i
            hsh[i * 1000 + j]
            hsh.delete(i * 1000 + j)
          end
        end
      end.map(&:join)
    end
  end
end

Version data entries

104 entries across 98 versions & 30 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/thread_safe-0.3.6/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/thread_safe-0.3.6-java/spec/thread_safe/hash_spec.rb