Sha256: 19900ea0a0d72f695068cdcdf420f7ae61b94bbc6bff63d16b3149449c4f3591
Contents?: true
Size: 170 Bytes
Versions: 2
Compression:
Stored size: 170 Bytes
Contents
module SupplyDrop module AsyncEnumerable def each(&block) self.map do |item| Thread.new { block.call(item) } end.each(&:join) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
supply_drop-0.6.0 | lib/supply_drop/async_enumerable.rb |
supply_drop-0.5.0 | lib/supply_drop/async_enumerable.rb |