[slime-devel] Re: Threading warnings on SBCL 1.0.19 Darwin x86

Karsten Poeck karsten.poeck at gmail.com
Wed Aug 27 19:46:29 UTC 2008


In article <m27ia249rr.fsf at common-lisp.net>,
 Helmut Eller <heller at common-lisp.net> wrote:

> (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 ())))))

Using progn instead of loop
->
uname -a
Darwin karsten-poecks-macbook-pro.local 9.4.0 Darwin Kernel Version 
9.4.0: Mon Jun  9 19:30:53 PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 
i386


* (lisp-implementation-type)

"SBCL"
* (lisp-implementation-version)

"1.0.19"
* (progn
  (defvar *mutex* (sb-thread:make-mutex))
  (defvar *waitqueue* (sb-thread:make-waitqueue))
  (progn
   (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 ())))))
; in: LAMBDA NIL
;     (SB-THREAD:CONDITION-WAIT *WAITQUEUE* *MUTEX*)
; ==>
;   *WAITQUEUE*
; 
; note: deleting unreachable code
; 
; compilation unit finished
;   printed 1 note
sleeping..
WARNING:
   Releasing #S(SB-THREAD:MUTEX
                :NAME NIL
                :%OWNER NIL
                :LUTEX #<unknown pointer object, widetag=#x5E 
{116E3C87}>), owned by another thread: NIL

With loop I get more of this warnings until sbcl finally hangs.

What are you trying to achieve here, perhaps there is another way to 
achieve the same?

Karsten




More information about the slime-devel mailing list