Sha256: bce9cf71e23f505f6ade973c66e91f4457ba93b47d3f048e1e31962b591ccd60
Contents?: true
Size: 332 Bytes
Versions: 5
Compression:
Stored size: 332 Bytes
Contents
class PgExport module Concurrency class ThreadsArray < Array def <<(job) super Thread.new { job } end alias push << end def self.included(*) Thread.abort_on_exception = true end def concurrently t = ThreadsArray.new yield t t.each(&:join) end end end
Version data entries
5 entries across 5 versions & 1 rubygems