From a73fd1ca5091e2eb089cf63583ce54b6415561f5 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 10 Mar 2025 21:33:29 +0000 Subject: [PATCH] Add a fibers-parallel test --- tests/parallelism.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/parallelism.scm b/tests/parallelism.scm index f005d71..9881a4d 100644 --- a/tests/parallelism.scm +++ b/tests/parallelism.scm @@ -93,4 +93,22 @@ 1)) #:unwind? #t))) +(run-fibers-for-tests + (lambda () + (let ((a 0)) + (call-with-values + (lambda () + (fibers-parallel + (begin + (sleep 1) + 1) + (begin + (set! a 1) + 2))) + (lambda (a b) + (assert-equal a 1) + (assert-equal b 2))) + + (assert-equal a 1)))) + (display "parallelism test finished successfully\n")