From acb4c3bb9bdab9a1cf38d397984c20ac77e90bc2 Mon Sep 17 00:00:00 2001 From: Heinrich Klobuczek Date: Thu, 6 Aug 2020 12:50:05 -0800 Subject: [PATCH] concurrency issue on MRI --- spec/neo4j/driver/multithreading_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 spec/neo4j/driver/multithreading_spec.rb diff --git a/spec/neo4j/driver/multithreading_spec.rb b/spec/neo4j/driver/multithreading_spec.rb new file mode 100644 index 00000000..c53a6106 --- /dev/null +++ b/spec/neo4j/driver/multithreading_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +RSpec.describe Neo4j::Driver do + it 'supports many concurrent thread' do + threads = (1..10).map do |_n| + Thread.new do + (1..100).each do |_m| + driver.session do |session| + session.read_transaction {} + end + end + end + end + threads.map(&:join) + end +end \ No newline at end of file