diff --git a/knots/parallelism.scm b/knots/parallelism.scm index a3b04c7..9e80f5b 100644 --- a/knots/parallelism.scm +++ b/knots/parallelism.scm @@ -217,9 +217,9 @@ (if (null? active-channels) (map (match-lambda - ((#f . ('exception exn)) + ((#f . ('exception . exn)) (raise-exception exn)) - ((#f . ('result val)) + ((#f . ('result . val)) val)) channels-to-results) (loop @@ -239,10 +239,10 @@ (if (eq? channel c) (cons #f (match result - (('exception exn) + (('exception . exn) result) (_ - (list 'result result)))) + (cons 'result result)))) (cons c r)))) channels-to-results))) #f)))) diff --git a/knots/resource-pool.scm b/knots/resource-pool.scm index e55bdac..71c378c 100644 --- a/knots/resource-pool.scm +++ b/knots/resource-pool.scm @@ -1351,7 +1351,8 @@ available. Return the resource once PROC has returned." 'destroy 'return) resource)) - (raise-exception exn)) + (unless (resource-pool-destroy-resource-exception? exn) + (raise-exception exn))) (lambda () (with-exception-handler (lambda (exn) diff --git a/tests/parallelism.scm b/tests/parallelism.scm index 91b2f3d..03ec376 100644 --- a/tests/parallelism.scm +++ b/tests/parallelism.scm @@ -61,24 +61,6 @@ identity '(())))) -(run-fibers-for-tests - (lambda () - (with-exception-handler - (lambda (exn) - (unless (and (exception-with-message? exn) - (string=? (exception-message exn) - "foo")) - (raise-exception exn))) - (lambda () - (fibers-map-with-progress - (lambda _ - (raise-exception - (make-exception-with-message "foo"))) - '((1))) - - (error 'should-not-reach-here)) - #:unwind? #t))) - (run-fibers-for-tests (lambda () (with-exception-handler