aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2025-08-05 18:48:07 -0400
committerGravatar Peter McGoron 2025-08-05 18:48:07 -0400
commitb2d20f903a9de21e89b15b512123f6ff9aca3504 (patch)
treeb545b95f858344fa7b6061b7d04a951f55e9e81e /lib
parentadd chibi (diff)
remove inspect-test-info procedure from mutexes so that it can itself lock mutexes if desired
Diffstat (limited to 'lib')
-rw-r--r--lib/conspire.scm10
-rw-r--r--lib/r7rs-single-threaded.scm1
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/conspire.scm b/lib/conspire.scm
index 74a4c03..564b9f0 100644
--- a/lib/conspire.scm
+++ b/lib/conspire.scm
@@ -36,11 +36,11 @@
(define (inspect-test-info proc)
(let ((mutex (test-info-mutex (test-info))))
- (dynamic-wind
- (lambda () (mutex-lock! mutex))
- (lambda () (proc (test-info-dto (test-info))
- (test-info-dict (test-info))))
- (lambda () (mutex-unlock! mutex)))))
+ (mutex-lock! mutex)
+ (let-values (((dto dict) (values (test-info-dto (test-info))
+ (test-info-dict (test-info)))))
+ (mutex-unlock! mutex)
+ (proc dto dict))))
(define-syntax define-destructive-test-info-procedure
(syntax-rules ()
diff --git a/lib/r7rs-single-threaded.scm b/lib/r7rs-single-threaded.scm
index efa91c9..f3138e8 100644
--- a/lib/r7rs-single-threaded.scm
+++ b/lib/r7rs-single-threaded.scm
@@ -26,6 +26,7 @@
(dto test-info-dto)
(dict test-info-dict set-test-info-dict!))
+(define (test-info-mutex x) #f)
(define (mutex-lock! x) #f)
(define (mutex-unlock! x) #f)