From 3aab1be1e7ece854ff20e4e5b84c1be2165c0234 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 4 Mar 2025 14:09:31 +0000 Subject: [PATCH] Revert "Use module-ref for make-base-operation" This isn't working, with make-base-operation changing from part of a macro to a procedure, I'm not sure how to maintain compatability. I think just switching to guile-fibers-next everywhere is the approach to take. This reverts commit f41d1853ceb9f8d297fc756925a08f6d11d30d10. --- knots/timeout.scm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/knots/timeout.scm b/knots/timeout.scm index 21c2267..552d079 100644 --- a/knots/timeout.scm +++ b/knots/timeout.scm @@ -119,19 +119,17 @@ (define (make-wait-operation ready? schedule-when-ready port port-ready-fd this-procedure) - ((module-ref (resolve-interface '(fibers operations)) - 'make-base-operation) - #f - (lambda _ - (and (ready? port) values)) - (lambda (flag sched resume) - (define (commit) - (match (atomic-box-compare-and-swap! flag 'W 'S) - ('W (resume values)) - ('C (commit)) - ('S #f))) - (schedule-when-ready - sched (port-ready-fd port) commit)))) + (make-base-operation #f + (lambda _ + (and (ready? port) values)) + (lambda (flag sched resume) + (define (commit) + (match (atomic-box-compare-and-swap! flag 'W 'S) + ('W (resume values)) + ('C (commit)) + ('S #f))) + (schedule-when-ready + sched (port-ready-fd port) commit)))) (define (wait-until-port-readable-operation port) "Make an operation that will succeed when PORT is readable."