Closed noteflakes closed 11 months ago
Allow copying queries. This may facilitate working with queries in multiple threads:
query = db.prepare('select * from foo where bar = ?') results = Queue.new workers = (1..10).map do |i| Thread.new results << query.clone.to_a(i) end end
Allow copying queries. This may facilitate working with queries in multiple threads: