Sha256: 844b4a948ecc734139a433e74c88bc36e89abc702f6826a4d7fcc5e46bd89e06
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
module Jekyll module S3 class Parallelism def self.each_in_parallel_or_sequentially(items, &operation) if ENV['disable_parallel_processing'] items.each do |item| operation.call item end else threads = items.map do |item| Thread.new(item) { |item| operation.call item } end threads.each { |thread| thread.join } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jekyll-s3-3.2.0 | lib/jekyll-s3/parallelism.rb |