yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb
@ 2018-12-08  8:30 Lin Jen-Shin
  2018-12-08  8:30 ` [PATCH 2/2] @srv.shutdown could raise Errno::ENOTCONN Lin Jen-Shin
  2018-12-08 11:36 ` [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb Eric Wong
  0 siblings, 2 replies; 6+ messages in thread
From: Lin Jen-Shin @ 2018-12-08  8:30 UTC (permalink / raw)
  To: yahns-public; +Cc: Lin Jen-Shin

Since we rely on this class being an IO-like class,
in Yahns::Queue#worker_thread we're using this method.

This fixes an actual error on lib/yahns/queue_kqueue.rb:56
---
 lib/yahns/queue_quitter_pipe.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/yahns/queue_quitter_pipe.rb b/lib/yahns/queue_quitter_pipe.rb
index eabfb00..789eacd 100644
--- a/lib/yahns/queue_quitter_pipe.rb
+++ b/lib/yahns/queue_quitter_pipe.rb
@@ -22,4 +22,8 @@ def close
     @reader.close
     @to_io.close
   end
+
+  def closed?
+    @to_io.closed?
+  end
 end
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-09  8:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08  8:30 [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb Lin Jen-Shin
2018-12-08  8:30 ` [PATCH 2/2] @srv.shutdown could raise Errno::ENOTCONN Lin Jen-Shin
2018-12-08 11:36 ` [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb Eric Wong
2018-12-08 11:52   ` Lin Jen-Shin (godfat)
2018-12-08 17:20     ` Eric Wong
2018-12-09  8:49       ` Lin Jen-Shin (godfat)

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).