1 Return-Path: <felipe.contreras@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 175C2431FAF
\r
6 for <notmuch@notmuchmail.org>; Mon, 23 Apr 2012 08:07:27 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id TxsVU5sNw1PQ for <notmuch@notmuchmail.org>;
\r
17 Mon, 23 Apr 2012 08:07:26 -0700 (PDT)
\r
18 Received: from mail-ey0-f181.google.com (mail-ey0-f181.google.com
\r
19 [209.85.215.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 2C311431FAE
\r
22 for <notmuch@notmuchmail.org>; Mon, 23 Apr 2012 08:07:26 -0700 (PDT)
\r
23 Received: by eaa1 with SMTP id 1so4912810eaa.26
\r
24 for <notmuch@notmuchmail.org>; Mon, 23 Apr 2012 08:07:23 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
\r
28 bh=WA3Wqp46pcCqFw/5HuNJJKjQIw5GOpMJ9NtnEc9d+ck=;
\r
29 b=S0RRDY0ZLyP6XOm/++aliPpMw/9ZhIgY5ppBjxgz97dwbJInbxjaLGCROPCmXHMHiq
\r
30 ChL8l+VLKMnqgIEuDbwNTfgTJ9sGac+pJ0RjWMdSlzqB4n4/QgZ1ZHalvdBk/0REFq/r
\r
31 LSjGOEUqKy/ruSTZQ3Ore2bGO8DJC09d5qe0wniw0NjHXW+FRUIWvnXx4cpIc8vfOn+U
\r
32 5suq62KLrFwhWKDM6W3IJp4HbfzFZnQsfabJkQfAy816PnjynbIwJDbbgVnSxfq66Hlg
\r
33 4OQGrjXrr21hbWtmvk1NVPcP92YbsvK4NNvhVzih+7r/kQg7E3DLIF9F6IsTTahWgLUu
\r
36 Received: by 10.213.16.140 with SMTP id o12mr1239676eba.150.1335193643295;
\r
37 Mon, 23 Apr 2012 08:07:23 -0700 (PDT)
\r
38 Received: by 10.213.103.18 with HTTP; Mon, 23 Apr 2012 08:07:23 -0700 (PDT)
\r
40 <CADv3eywAvyMuh3vWLwyuf0Ui_kskwp9875pGxCR1GTm7deN9Pg@mail.gmail.com>
\r
41 References: <1335185032-13075-1-git-send-email-felipe.contreras@gmail.com>
\r
42 <CADv3eywAvyMuh3vWLwyuf0Ui_kskwp9875pGxCR1GTm7deN9Pg@mail.gmail.com>
\r
43 Date: Mon, 23 Apr 2012 18:07:23 +0300
\r
45 <CAMP44s3SyU4WVV0_McHWseNL=jmMnAXO2EdZK4Xk-wrCHPVD8A@mail.gmail.com>
\r
46 Subject: Re: [PATCH] ruby: make sure the database is closed
\r
47 From: Felipe Contreras <felipe.contreras@gmail.com>
\r
48 To: Ali Polatel <alip@exherbo.org>
\r
49 Content-Type: text/plain; charset=UTF-8
\r
50 Cc: notmuch@notmuchmail.org
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.13
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Mon, 23 Apr 2012 15:07:27 -0000
\r
65 On Mon, Apr 23, 2012 at 5:04 PM, Ali Polatel <alip@exherbo.org> wrote:
\r
67 > I'd rather not do this.
\r
68 > Please read: http://comments.gmane.org/gmane.comp.lang.ruby.general/320324
\r
70 OK, I've read this.. So?
\r
72 The order in which Ruby's garbage-collector frees the database and
\r
73 other objects is irrelevant, because with this patch we are not
\r
74 manually freeing other objects, only the database.
\r
76 Sure, it's _better_ if the user calls close(), even better if it's
\r
77 inside an 'ensure', and even better if blocks are used (which I am
\r
78 using in most cases), but that's not *required*.
\r
80 The user might just do:
\r
83 db = Notmuch::Database.new($db_name, :mode => Notmuch::MODE_READ_WRITE)
\r
86 That's perfectly fine in Ruby (although not ideal), since 'db' will
\r
87 get garbage-collected. But nobody will be able to use the database
\r
88 again until that process is killed.
\r
90 You think that's correct?
\r