yahns Ruby server user/dev discussion
 help / color / Atom feed
From: Lin Jen-Shin <godfat@godfat.org>
To: yahns-public@yhbt.net
Cc: Lin Jen-Shin <godfat@godfat.org>
Subject: [PATCH 1/2] Add QueueQuitter#closed? to queue_quitter_pipe.rb
Date: Sat,  8 Dec 2018 08:30:18 +0000
Message-ID: <20181208083019.4374-1-godfat@godfat.org> (raw)

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


             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08  8:30 Lin Jen-Shin [this message]
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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/yahns/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181208083019.4374-1-godfat@godfat.org \
    --to=godfat@godfat.org \
    --cc=yahns-public@yhbt.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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