Hi Folks,
Several of us users are experience problems with SLIME HEAD on Darwin x86
using :SB-THREAD. SBCL will repeatedly issue warnings such as the follow-
ing:
WARNING:
Releasing #S(SB-THREAD:MUTEX
:NAME NIL
:%OWNER NIL
:LUTEX #<unknown pointer object, widetag=#x5E {119C32DF}>),
owned by another thread: NIL
Helmet Eller kindly offered a test case representing SLIME's use of
WITH-TIMEOUT and CONDITION-WAIT:
(progn
(defvar *mutex* (sb-thread:make-mutex))
(defvar *waitqueue* (sb-thread:make-waitqueue))
(loop
(sb-thread:with-mutex (*mutex*)
(format t "sleeping..~%")
(sleep 0.1)
(handler-case (sb-ext:with-timeout 0.2
(sb-thread:condition-wait *waitqueue* *mutex*))
(sb-ext:timeout ())))))
This form is able to reproduce the warning message seen in SLIME.
How can CONDITION-WAIT be interrupted without yielding this warning? It
seems sensible that CONDITION-WAIT could take a :TIMEOUT value as Helmut
had suggested on slime-devel.
Thanks for the help,
- Scott Bell
|