Simplify and extend using the knots exception with stack
This commit is contained in:
parent
d8bc09755e
commit
ed4113af51
3 changed files with 38 additions and 29 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue