From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IG0yHbp0VGGElQAAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 16:14:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0KPNGLp0VGERcAAAB5/wlQ (envelope-from ) for ; Wed, 29 Sep 2021 14:14:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 038952B65A for ; Wed, 29 Sep 2021 16:14:18 +0200 (CEST) Received: from localhost ([::1]:41336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVaLh-0002XB-5p for larch@yhetil.org; Wed, 29 Sep 2021 10:14:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56698) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVaLT-0002SY-2q for guix-patches@gnu.org; Wed, 29 Sep 2021 10:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38121) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVaLS-000160-Qn for guix-patches@gnu.org; Wed, 29 Sep 2021 10:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVaLS-0003is-Gi; Wed, 29 Sep 2021 10:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning exceptions. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai , 50814@debbugs.gnu.org Received: via spool by 50814-submit@debbugs.gnu.org id=B50814.163292483514291 (code B ref 50814); Wed, 29 Sep 2021 14:14:02 +0000 Received: (at 50814) by debbugs.gnu.org; 29 Sep 2021 14:13:55 +0000 Received: from localhost ([127.0.0.1]:49667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVaLL-0003iQ-5O for submit@debbugs.gnu.org; Wed, 29 Sep 2021 10:13:55 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:44186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVaLG-0003iE-Lk for 50814@debbugs.gnu.org; Wed, 29 Sep 2021 10:13:53 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by andre.telenet-ops.be with bizsmtp id zqDo2500b0mfAB401qDoYM; Wed, 29 Sep 2021 16:13:49 +0200 Message-ID: <9c093db2d9019ef2fe9b27979a3b51848f179a3b.camel@telenet.be> From: Maxime Devos Date: Wed, 29 Sep 2021 16:13:42 +0200 In-Reply-To: <20210928162406.27205-4-attila@lendvai.name> References: <20210928162406.27205-1-attila@lendvai.name> <20210928162406.27205-4-attila@lendvai.name> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-fwnIi1rQ1JgQz8m0OazP" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1632924829; bh=5Ffj+pQ3MovUAxbPyulRYK4eGVoJqKAIe75r1CDU1+U=; h=Subject:From:To:Date:In-Reply-To:References; b=NFYv/8D+VxkVevOjOmV83HQa6DBrDMQYCYDJfVV9giBkstHoYPfjb0dndQwfUhYM5 IHzsgEm6Y8RnCLC4pcu0CKiThnfFetiVjpP8gV7eFeSUJ1AcLQzrU0beM5pD+gN9H/ 8g8TIQTDiP9m38jmyNBPERJN4GHrWE1Ns2GanX/quBll0rCWxtVb4kiqFZymVe3smf iRsUrtmkuCi3fIS15Lsy/hJuSFe9B4iMyOv9aAZjtkaKDeIrVziREh8y4CUDM8US/I CX/aN2Y7yb66iZDXitgCcsNgwPjLGSxETN6qYOdY6GNJAUPVBJxXpvfcp6oqF+V0he dsZSOk9Y4brGw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632924858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=5Ffj+pQ3MovUAxbPyulRYK4eGVoJqKAIe75r1CDU1+U=; b=ITTAgjWhp/tdadiWpHZFRjwfLHyPwuP/J2zEClxvVqtMMmWYiI+oAgItGeJ4jEBGBCqPGf PJ1w2/NwLNrRp958DlKkrwmjexgO25n84Tmlx/MUP9jB/VODDLW/kt8kD6t9nN5K3hpHrJ Y2S5ZcOazQhfC8IV/jBxf5dIFjbW+sGYcswHBmaxFN4i+jXgYLhcqta59JLJU2jZDd2gGz HDi54LvVfhLLBeu8RkHLi5KufHaxxxeJR6flwScFFN6j5l8yvdJXZlnhxwMK7trmaetYWs 4fE5xFQTzeI/ph1jfoxl0pd3+xuX6OwYJFVUaduXbkZWCeEn2WSfeXuBq1sTWQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632924858; a=rsa-sha256; cv=none; b=KGpzyO1VIzpBGmUaTSEIvceKo1gGJerYpc1HDgZzcW3MFkRNvkaiYhP8fdZkBF/g0fXA7r veWmTAIvVBWnGbNMQo6pYUFczHVEBXu/tInGW/z+JE15SIBjdBRY5r6Kgy674LCmT2MCnG KGw1Tqqb9h5cHwC9Hrq5MgyvZE52E4/LJKYvvwtYOsjy6nE8jXWq1gZ1ozASJU0YGzkZgo Qo/e/NcWbR7Tbh+8DMOJOxBCJS7DhoCHQYEnJdaa7xthWVMPjME++AG9onFhth4cEmAzgl PL8uNIQSV5OQQ7q8jJ9htHD+jT0ToVLgRa2OTfEo93gK91sJua9vQBoa/DkvPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="NFYv/8D+"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b="NFYv/8D+"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 038952B65A X-Spam-Score: -3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: D0b85Pc5GkBe --=-fwnIi1rQ1JgQz8m0OazP Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attila Lendvai schreef op di 28-09-2021 om 18:24 [+0200]: > (define (call-with-store proc) > "Call PROC with an open store connection." > - (let ((store (open-connection))) > + (let ((store '())) > (define (thunk) > (parameterize ((current-store-protocol-version > (store-connection-version store))) > (call-with-values (lambda () (proc store)) > (lambda results > - (close-connection store) > (apply values results))))) > =20 > - (with-exception-handler (lambda (exception) > - (close-connection store) > - (raise-exception exception)) > - thunk))) > + (dynamic-wind > + (lambda () > + (set! store (open-connection))) > + thunk > + (lambda () > + (close-connection store) > + (set! store '()))))) Do we really need to close and open the connection again every time a continuation is made and resumed? This seems inefficient if a threading mechanism implemented by continuations is used (such as guile-fibers), and there are two threads (=E2=80=98fibers=E2=80=99) communicating and wait= ing with/for each other in a loop, causing many =E2=80=98context switches=E2=80=99 (i.e.= , many captured and resumed continuations). Also note that a connection has some state: to the guix-daemon, it acts as a GC root for everything built with the connection, and everything added to the store (with add-to-store & friends) with that connection ... Simply reconnecting isn't sufficient. Greetings, Maxime --=-fwnIi1rQ1JgQz8m0OazP Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVR0lhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pHcAP90sSXgTCFgHHH0TfD2dUDxQjys 03G/1Cix0O9jBBSZ2wD+KVvjBBduVO0t/RijZwAYoRDaykNRGY8suWjYft5TKgY= =887w -----END PGP SIGNATURE----- --=-fwnIi1rQ1JgQz8m0OazP--