lib/zold/thread_pool.rb in zold-0.18.7 vs lib/zold/thread_pool.rb in zold-0.18.8

- old
+ new

@@ -39,11 +39,10 @@ end # Run this code in many threads def run(threads, set = (0..threads - 1).to_a) raise "Number of threads #{threads} has to be positive" unless threads.positive? - raise 'Set of data can\'t be empty' if set.empty? idx = Concurrent::AtomicFixnum.new mutex = Mutex.new list = set.dup [threads, set.count].min.times do add do @@ -111,10 +110,10 @@ @threads.map do |t| { name: t.name, status: t.status, alive: t.alive?, - vars: t.thread_variables.map { |v| { k: v, v: t.thread_variable_get(v) } } + vars: t.thread_variables.map { |v| { v.to_s => t.thread_variable_get(v) } } } end end # As a text