diff options
author | Christopher Baines <mail@cbaines.net> | 2024-05-11 17:53:20 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2024-05-13 19:31:17 +0100 |
commit | 3db1a8341c815af3673c367518fbb193f5592864 (patch) | |
tree | e598b06a59d95c4943ec7983d2605fbd3fa2c23c /.dir-locals.el | |
parent | 1632fd0f1b1ef6e55e495161d4a056d7164b8581 (diff) |
store: Add with-store/non-blocking.
For some applications, it's important to establish a non-blocking connection
rather than just making the socket non-blocking after the connection is
established. This is because there is I/O on the socket that will block during
the handshake.
I've noticed this blocking during the handshake causing issues in the build
coordinator for example.
This commit adds a new with-store variant to avoid changing the behaviour of
with-store/open-connection to ensure that this change can't break anything
that depends on the blocking nature of the socket.
* guix/store.scm (open-unix-domain-socket, open-inet-socket): Take
#:non-blocking? and use SOCK_NONBLOCK when calling socket if appropriate.
(connect-to-daemon, open-connection, call-with-store): Take #:non-blocking?
and pass it on.
(with-store/non-blocking): New syntax rule.
* .dir-locals.el (scheme-mode): Add entry for with-store/non-blocking.
Change-Id: I8225762b78448bc1f7b698c8de5d736e13f577bf
Diffstat (limited to '.dir-locals.el')
-rw-r--r-- | .dir-locals.el | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index d2f6037afe..d0c25b867b 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -88,6 +88,7 @@ (eval . (put 'manifest-pattern 'scheme-indent-function 0)) (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) (eval . (put 'with-store 'scheme-indent-function 1)) + (eval . (put 'with-store/non-blocking 'scheme-indent-function 1)) (eval . (put 'with-external-store 'scheme-indent-function 1)) (eval . (put 'with-error-handling 'scheme-indent-function 0)) (eval . (put 'with-mutex 'scheme-indent-function 1)) |