yahns Ruby server user/dev discussion
 help / color / 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	[flat|nested] 6+ messages in thread

end of thread, back to index

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)

yahns Ruby server user/dev discussion

Archives are clonable:
	git clone --mirror https://yhbt.net/yahns-public
	git clone --mirror http://ou63pmih66umazou.onion/yahns-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git