From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-2.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0AB5120A1E for ; Sat, 8 Dec 2018 08:30:32 +0000 (UTC) Received: by mail-pf1-x42e.google.com with SMTP id b7so3044949pfi.8 for ; Sat, 08 Dec 2018 00:30:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=godfat.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wL1lqZ4LFmzRBl3FcUQUWCUhkuHjk21M1g/fOcQKxIU=; b=Y6TtygulUvQMlhDx/hGSIZ8UWHp8ZM5TaAB830mrvq/ZmVKehIeNF3YGVr+tBSecL1 MTNDm9253aN5eQl1GyXayxdeqwg+8Vv57SiukMcO6M7MLydL7ZVLeLf/FOJM0mbpTAwQ +YatLs4Rg8ddHSGyoyou7erBvROer85aelzpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wL1lqZ4LFmzRBl3FcUQUWCUhkuHjk21M1g/fOcQKxIU=; b=E2wAibu8wHDCzahYFJ//mMmXuvtATUO/3aqv0WDF3Bt1LLn3bORbgXLdKnsvznb3ea 2bL77J4EmX3n3O7zEqucMqwuCK8AJ+fPwQZkZATsSuoX9ja2Hc3YzZ0OnIdqyt7Nnooa JRvW6WxgfrhqfTjmNUdOb0IUFXEv6RgcXA2WJnuFLgDsBYryJCY01ro3uYLw2gVPBLoR aqL+Qvgl9GpNS+9S/MXRpLci37uSiUcxhOW0WURYlAqzT1RwiRy6muTmSisIj8w6u6cG qGFbHN6uVR43snuvwLkzNW1O/3onyaHKD27NMg1/HPuhy8IPS494odS6/+2J8gIytlrx ys0Q== X-Gm-Message-State: AA+aEWbgBnHN6RpDWuunCHtZUMTnUfEecS0xV0HII2g2nfNLyo0PaCk3 niXaYj5YKhFzwLiuXGsCys52CUHgiB2urg== X-Google-Smtp-Source: AFSGD/X6gLXUCX87+6DV/C1CaGhTD4PqKbiX1qxaKMQT2ZyZHgm9OPzXjxTH7ZPm8KNgl8Eyxx6EDQ== X-Received: by 2002:a62:44d8:: with SMTP id m85mr5265120pfi.164.1544257829418; Sat, 08 Dec 2018 00:30:29 -0800 (PST) Received: from li1544-77.localdomain ([2400:8902::f03c:91ff:fee0:d06a]) by smtp.gmail.com with ESMTPSA id r8sm6444393pgr.48.2018.12.08.00.30.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Dec 2018 00:30:28 -0800 (PST) From: Lin Jen-Shin To: yahns-public@yhbt.net Cc: Lin Jen-Shin 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> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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