Christopher Baines 3db1a8341c
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
2024-05-13 19:31:17 +01:00
..
2024-05-09 00:02:39 +02:00
2023-03-13 15:08:33 +01:00
2023-09-26 17:36:58 +02:00
2024-03-07 13:04:27 +02:00
2024-04-15 22:36:42 +02:00
2024-04-15 22:36:42 +02:00
2024-01-08 21:04:44 +03:00
2024-04-15 22:36:42 +02:00
2024-04-15 22:36:42 +02:00
2023-08-25 14:24:43 +02:00
2023-03-13 15:08:33 +01:00
2024-04-15 22:36:42 +02:00
2023-03-13 15:08:33 +01:00
2023-03-13 15:08:33 +01:00
2024-04-15 22:36:42 +02:00
2024-05-13 12:01:49 +01:00
2024-05-13 19:31:17 +01:00
2024-04-15 22:36:42 +02:00