[erlisp-devel] mistake in with-timeout?
Eric Lavigne
lavigne.eric at gmail.com
Mon Jul 11 04:54:07 UTC 2005
Dear Erlisp developers,
I need some help to figure out a problem with my code. I am trying to
add Allegro support to Erlisp, but I ran into some trouble as shown in
this test result:
...........f........................
Did 36 checks.
Pass: 35 (97%)
Skip: 0 (0%)
Fail: 1 (2%)
Failure Details:
RECEIVE-WITH-TIMEOUT []:
NIL.
I suspect my mistake is in erlisp:with-timeout. Here is a copy of that macro:
(defmacro with-timeout ((milliseconds &rest after-timeout) &body body)
#+sbcl `(sb-ext:with-timeout (/ ,milliseconds 1000)
(handler-case (progn , at body)
(sb-ext:timeout () , at after-timeout)))
#+allegro `(mp:with-timeout ((/ ,milliseconds 1000) , at after-timeout)
, at body)
#-(or sbcl allegro) (error
"Timeouts are not yet implemented for your compiler."))
The part I added (probably broken) is prefaced by #+allegro.
Dirk's working code is prefaced by #+sbcl.
Documentation on the allegro with-timeout macro is available here:
http://www.franz.com/support/documentation/6.2/doc/pages/operators/mp/with-timeout.htm
A complete copy of compatibility.lisp (the only modified file) is
available here:
http://plaza.ufl.edu/lavigne/compatibility.lisp
Hopefully you can figure out my mistake so Erlisp can work on one more
compiler. I would appreciate any ideas about what might be wrong.
Eric
--
plaza.ufl.edu/lavigne/
More information about the Erlisp-devel
mailing list