1 (defmacro assert-timeout
(form)
2 (let ((ok (gensym "OK")))
8 (error "No timeout from form:~% ~S" ',form
)))))
12 (sb-impl::with-deadline
(:seconds
1)
13 (run-program "sleep" '("5") :search t
:wait t
)))
15 #+(and sb-thread
(not sb-lutex
))
18 (let ((lock (sb-thread:make-mutex
))
20 (sb-thread:make-thread
(lambda ()
21 (sb-thread:get-mutex lock
)
24 (loop while waitp do
(sleep 0.01))
25 (sb-impl::with-deadline
(:seconds
1)
26 (sb-thread:get-mutex lock
))))
29 (let ((sem (sb-thread::make-semaphore
:count
0)))
30 (sb-impl::with-deadline
(:seconds
1)
31 (sb-thread::wait-on-semaphore sem
))))
34 (sb-impl::with-deadline
(:seconds
1)
35 (sb-thread:join-thread
36 (sb-thread:make-thread
(lambda () (loop (sleep 1))))))))