GNU bug report logs -
#50814
[PATCH] guix: git-authenticate: Also authenticate the channel intro commit.
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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 (application/pgp-signature, inline)]
This bug report was last modified 3 years and 72 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.