1
0
mirror of https://github.com/janet-lang/janet synced 2025-09-10 14:56:08 +00:00

Support using a background thread to monitor deadlines

This commit is contained in:
Michael Camilleri
2025-03-25 20:27:44 +09:00
parent 73334f3485
commit 2ed186664f
3 changed files with 107 additions and 11 deletions

View File

@@ -550,4 +550,8 @@
(ev/sleep 0.15)
(assert (not terminated-normally) "early termination failure 3"))
(let [f (coro (forever :foo))]
(ev/deadline 0.01 nil f true)
(assert-error "deadline expired" (resume f)))
(end-suite)