lib/yahns/queue_quitter_pipe.rb in yahns-1.16.0 vs lib/yahns/queue_quitter_pipe.rb in yahns-1.17.0

- old
+ new

@@ -5,11 +5,10 @@ # POSIX pipe version, see queue_quitter.rb for the (preferred) eventfd one class Yahns::QueueQuitter # :nodoc: attr_reader :to_io def initialize @reader, @to_io = IO.pipe - @to_io.close_on_exec = true end def yahns_step Thread.current.exit end @@ -19,7 +18,11 @@ end def close @reader.close @to_io.close + end + + def closed? + @to_io.closed? end end