Initial commit

This commit is contained in:
Christopher Baines 2024-11-19 18:43:43 +00:00
commit 2f39c58d6c
27 changed files with 2969 additions and 0 deletions

22
tests/timeout.scm Normal file
View file

@ -0,0 +1,22 @@
(use-modules (tests)
(fibers)
(unit-test)
(knots timeout))
(run-fibers-for-tests
(lambda ()
(assert-equal
1
(with-fibers-timeout
(const 1)
#:timeout 10))
(assert-equal
2
(with-fibers-timeout
(lambda ()
(sleep 10))
#:timeout 0.1
#:on-timeout (const 2)))))
(display "timeout test finished successfully\n")