Sha256: 0a2e6d95ce51b2f68e8a031e5effe93155202ca5de15d266091598ee1b746340
Contents?: true
Size: 308 Bytes
Versions: 5
Compression:
Stored size: 308 Bytes
Contents
require 'page_by_page/enum' class PageByPage class MutexEnum < Enum def initialize from: 1, step: 1 super @q = SizedQueue.new 10 Thread.new do loop do @q << @enum.next sleep 0.1 end end end def next @q.deq end end end
Version data entries
5 entries across 5 versions & 1 rubygems