29 lines
904 B
Plaintext
29 lines
904 B
Plaintext
;;; Regression test for WITH.MONITOR macro.
|
|
|
|
;;; AR 7706
|
|
;;; Nested with.monitor's for same lock lose.
|
|
;;; Need to make sure that return from inner with.monitor does
|
|
;;; not release lock unless it actually acquired it.
|
|
|
|
;;; This also tests ar 7280--interpreted with.monitor fails.
|
|
|
|
(do-test nested-monitor
|
|
(let ((lock (il:create.monitorlock "Test"))
|
|
)
|
|
(macrolet ((test-monitor ()
|
|
`(il:process.result
|
|
(il:add.process `(il:obtain.monitorlock ',lock t))
|
|
t)))
|
|
(and (il:with.monitor lock
|
|
(and (null (test-monitor)) ; locked now
|
|
(il:with.monitor lock
|
|
(null (test-monitor))) ; still locked
|
|
(null (test-monitor))) ; locked after nested exit
|
|
)
|
|
(not (null (test-monitor)))))) ; but unlocked now
|
|
)
|
|
|
|
STOP
|
|
|
|
|