[cl-soap-devel] Re: s-http-client problem
Sven Van Caekenberghe
scaekenberghe at common-lisp.net
Tue Jan 24 12:14:16 UTC 2006
On 24 Jan 2006, at 12:43, quasi wrote:
> On 1/23/06, Sven Van Caekenberghe <scaekenberghe at common-lisp.net>
> wrote:
>>
>> I think you should make sure that you have the latest version of S-
>> SYSDEPS.
>
> yep. I do. I updated all the dependencies.
>
>>
>> On other SBCL platforms there *is* multi-threading support (and locks
>> and stuff). I haven't actually tested there though.
>
> I am running SBCL 9.8 on debian/x86. & it does give me the error.
>
> the backtrace shows that in do-http-request-internal the connection
> variable is the one with the string "Execute ...". connection is
> bound using multiple-value-bind over get-open-connection.
>
> Digging further I find that the erronous message is actually the doc
> string of the macro with-process-lock in sysdeps.lisp .. :) As I am
> extremely new to this debugging in Lisp (first time actually) I can
> go no further and I dont know what to make of all this ...
>
> I would be extremely happy to read any explaination you have. Also
> any further pointers on the learning road would be nice :)
;; working with process locks
(defun make-process-lock (name)
"Create a named process lock object"
#+lispworks (mp:make-lock :name name)
#+abcl (ext:make-thread-lock)
#+openmcl (ccl:make-lock name)
#+allegro (mp:make-process-lock :name name)
#+sb-thread (sb-thread:make-mutex :name name)
#-(or lispworks abcl openmcl allegro sb-thread) nil)
(defmacro with-process-lock ((lock) &body body)
"Execute body wih the process lock grabbed, wait otherwise"
;; maybe it is safer to always use a timeout:
;; `(mp:with-lock (,lock (format nil "Waiting for ~s" (lock-
name ,lock)) 5) , at body)
;; if the lock cannot be claimed in 5s, nil is returned: test it
and throw a condition ?
#+lispworks `(mp:with-lock (,lock) , at body)
#+abcl `(ext:with-thread-lock (,lock) , at body)
#+openmcl `(ccl:with-lock-grabbed (,lock) , at body)
#+allegro `(mp:with-process-lock (,lock) , at body)
#+sb-thread `(sb-thread:with-recursive-lock (,lock) , at body)
#-(or lispworks abcl openmcl allegro sb-thread) `(progn , at body))
Above is the latest code from s-sydeps's darcs repository and from
the released tarball tgz.
Normally, :sb-thread should be on your *features* list, if not the
process lock object would be nil and the with-process-lock macro will
do nothing.
As I said before, there was a brief period some time ago when a
faulty version of the above code for SBCL was committed that led to
the problems you mentioned.
Please make sure you have the right versions of the code, and
otherwise please send a full stacktrace.
Sven
More information about the cl-soap-devel
mailing list