[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning ex
From: |
Maxime Devos |
Subject: |
[bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning exceptions. |
Date: |
Wed, 29 Sep 2021 16:13:42 +0200 |
User-agent: |
Evolution 3.34.2 |
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)))))
>
> - (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 (‘fibers’) communicating and waiting with/for
each other in a loop, causing many ‘context switches’ (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
signature.asc
Description: This is a digitally signed message part
- [bug#50814] [PATCH] guix: git-authenticate: Also authenticate the channel intro commit., (continued)
[bug#50814] [PATCH 3/5] tests: Add failing test for .guix-authorizations and channel intro., Attila Lendvai, 2021/09/28
[bug#50814] [PATCH 5/5] guix: git-authenticate: Fix authenticate-repository., Attila Lendvai, 2021/09/28