aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-06-15 16:58:55 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-15 16:58:55 +0100
commit47027afe12c2eb41d4f391dac4a7cd3b76133b45 (patch)
tree3d05e7749f390c203ab1aec1b7a3865fd5a7231a
parent841b98201620aefb1475bc68caaef6a1fa2d50a3 (diff)
downloadnar-herder-47027afe12c2eb41d4f391dac4a7cd3b76133b45.tar
nar-herder-47027afe12c2eb41d4f391dac4a7cd3b76133b45.tar.gz
Use port-poll rather than select
Following a similar change in the build coordinator.
-rw-r--r--nar-herder/utils.scm8
1 files changed, 2 insertions, 6 deletions
diff --git a/nar-herder/utils.scm b/nar-herder/utils.scm
index 4261b05..8cd540b 100644
--- a/nar-herder/utils.scm
+++ b/nar-herder/utils.scm
@@ -657,15 +657,11 @@ If already in the worker thread, call PROC immediately."
(define (readable? port)
"Test if PORT is writable."
- (match (select (vector port) #() #() 0)
- ((#() #() #()) #f)
- ((#(_) #() #()) #t)))
+ (= 1 (port-poll port "r" 0)))
(define (writable? port)
"Test if PORT is writable."
- (match (select #() (vector port) #() 0)
- ((#() #() #()) #f)
- ((#() #(_) #()) #t)))
+ (= 1 (port-poll port "w" 0)))
(define (make-wait-operation ready? schedule-when-ready port port-ready-fd this-procedure)
(make-base-operation #f