instance method Thread::Queue#closed?

closed? -> bool[permalink][rdoc]

キューが close されている時に true を返します。



q = Queue.new

[:resource1, :resource2, :resource3, nil].each { |r| q.push(r) }

q.closed? # => false
q.close
q.closed? # => true