diff options
Diffstat (limited to 'guix-build-coordinator/utils/fibers.scm')
-rw-r--r-- | guix-build-coordinator/utils/fibers.scm | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/guix-build-coordinator/utils/fibers.scm b/guix-build-coordinator/utils/fibers.scm index 293429c..2c7307f 100644 --- a/guix-build-coordinator/utils/fibers.scm +++ b/guix-build-coordinator/utils/fibers.scm @@ -447,20 +447,16 @@ 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 (lambda _ - (and (ready? (port-ready-fd port)) values)) + (and (ready? port) values)) (lambda (flag sched resume) (define (commit) (match (atomic-box-compare-and-swap! flag 'W 'S) |