Sha256: 3dcff6cdf640b22dac7d08b84c9664a85fce830633fdc987d86d75bee9b0e88e
Contents?: true
Size: 437 Bytes
Versions: 1
Compression:
Stored size: 437 Bytes
Contents
module Enumerable def threaded_map abort_on_exception do threads = [] each do |object| threads << Thread.new { yield object } end threads.map(&:value) end end private def abort_on_exception initial_abort_on_exception = Thread.abort_on_exception Thread.abort_on_exception ||= true value = yield Thread.abort_on_exception = initial_abort_on_exception value end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
twitter-4.2.0 | lib/twitter/core_ext/enumerable.rb |