Simplify and extend using the knots exception with stack

This commit is contained in:
Christopher Baines 2025-02-27 12:08:41 +00:00
parent d8bc09755e
commit ed4113af51
3 changed files with 38 additions and 29 deletions

View file

@ -2,6 +2,7 @@
(srfi srfi-71)
(fibers)
(unit-test)
(knots)
(knots thread-pool))
(let ((thread-pool
@ -41,4 +42,21 @@
(process-job 3))
(let ((thread-pool
(make-thread-pool 2)))
(run-fibers-for-tests
(lambda ()
(assert-equal
#t
(with-exception-handler
(lambda (exn)
(knots-exception? exn))
(lambda ()
(call-with-thread
thread-pool
(lambda ()
(+ 1 'a))))
#:unwind? #t)))))
(display "thread-pool test finished successfully\n")