[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/20: avahi: Poll less.
From: |
guix-commits |
Subject: |
01/20: avahi: Poll less. |
Date: |
Fri, 7 Jul 2023 09:31:44 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 0ae419877ce070721f8e5404c2fe7d721a22f998
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jul 6 11:56:53 2023 +0200
avahi: Poll less.
* guix/avahi.scm (avahi-publish-service-thread): Have #:timeout default
to #f when 'stop-loop?' is NEVER, or 500ms.
(avahi-browse-service-thread): #:timeout defaults to 500ms when
'stop-loop?' is provided.
---
guix/avahi.scm | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/guix/avahi.scm b/guix/avahi.scm
index cb0c85f9f4..502b0b9dcd 100644
--- a/guix/avahi.scm
+++ b/guix/avahi.scm
@@ -49,11 +49,17 @@
(port avahi-service-port)
(txt avahi-service-txt))
+(define never
+ ;; Never true.
+ (const #f))
+
(define* (avahi-publish-service-thread name
#:key
type port
- (stop-loop? (const #f))
- (timeout 100)
+ (stop-loop? never)
+ (timeout (if (eq? stop-loop? never)
+ #f
+ 500))
(txt '()))
"Publish the service TYPE using Avahi, for the given PORT, on all interfaces
and for all protocols. Also, advertise the given TXT record list.
@@ -89,10 +95,6 @@ when STOP-LOOP? procedure returns true."
(close-port socket)
ip))
-(define never
- ;; Never true.
- (const #f))
-
(define* (avahi-browse-service-thread proc
#:key
types
@@ -101,7 +103,7 @@ when STOP-LOOP? procedure returns true."
(stop-loop? never)
(timeout (if (eq? stop-loop? never)
#f
- 100)))
+ 500)))
"Browse services which type is part of the TYPES list, using Avahi. The
search is restricted to services with the given FAMILY. Each time a service
is found or removed, PROC is called and passed as argument the corresponding
- 06/20: gnu: Add ghc-generic-lens-core., (continued)
- 06/20: gnu: Add ghc-generic-lens-core., guix-commits, 2023/07/07
- 18/20: gnu: Add ghc-reflex., guix-commits, 2023/07/07
- 10/20: gnu: Add ghc-sdl2-gfx., guix-commits, 2023/07/07
- 11/20: gnu: Add ghc-exception-transformers., guix-commits, 2023/07/07
- 17/20: gnu: Add ghc-ref-tf., guix-commits, 2023/07/07
- 14/20: gnu: Add ghc-dependent-map., guix-commits, 2023/07/07
- 12/20: gnu: Add ghc-commutative-semigroup., guix-commits, 2023/07/07
- 19/20: gnu: Add ghc-reflex-sdl2., guix-commits, 2023/07/07
- 03/20: gnu: Add ghc-hscolour., guix-commits, 2023/07/07
- 13/20: gnu: Add ghc-dependent-sum., guix-commits, 2023/07/07
- 01/20: avahi: Poll less.,
guix-commits <=
- 15/20: gnu: Add ghc-prim-uniq., guix-commits, 2023/07/07