[gambit-list] termite exception propagation

James Long longster at gmail.com
Sat Sep 8 19:26:55 EDT 2007


You're right, I forgot the init, I've only used termite for local
nodes (and init just initializes your machine for interacting with
remote nodes, right?).  After I called init, I do indeed get #f.  I'm
not experienced enough with Termite to know why, sorry.  I do hope to
use Termite for a distributed application, so if you figure it out I'd
like to know.

On 9/7/07, Phil Dawes <pdawes at users.sf.net> wrote:
> After you've initialized termite with (init)?
>
> Cheers,
>
> Phil
>
> James Long wrote:
> > The below code works for me (which is exactly the same as yours):
> >
> > (define (test-exceptions)
> >   (with-exception-catcher
> >    (lambda (exception) #t)
> >    (lambda ()
> >      (spawn-link (lambda () (raise 'dying)))
> >      (? 5)
> >      #f)))
> >
> > $ gsi
> >> (include "test-exceptions.scm")
> >> (test-exceptions)
> > #t
> >
> > I'm on gambit 4b22 with the latest version of termite and running OS
> > X.  Although I can't directly help you, it may help to know that it
> > should work that way.
> >
> > On 9/7/07, Phil Dawes <pdawes at users.sf.net> wrote:
> >> Hi Gambit List,
> >>
> >> (I'm not sure if this is the right forum to ask termite questions,
> >> apologies if not)
> >>
> >> My understanding from the termite paper is that linked processes
> >> propagate exceptions to exception catchers/handlers, and so I was
> >> expecting the following to return #t:
> >>
> >> (define (test-spawn-link)
> >>    (with-exception-catcher
> >>     (lambda (exception) #t)
> >>     (lambda ()
> >>       (spawn-link (lambda ()
> >>                     (raise 'dying)))
> >>       (? 5)
> >>       #f)
> >>     ))
> >>
> >> (init)
> >> (test-spawn-link)
> >>
> >> However this returns #f, indicating that the handler isn't called.
> >> Moreover the value of the exception is returned by the receiver (? 5).
> >> Am I missing something or has this behaviour changed since the paper?
> >>
> >> Also, is there anywhere else to get documentation for termite?
> >>
> >> (tested on gambit 4b22 and 4.0.0)
> >>
> >> Many thanks,
> >>
> >> Phil
> >>
> >>
> >>
> >> _______________________________________________
> >> Gambit-list mailing list
> >> Gambit-list at iro.umontreal.ca
> >> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
> >>
> >
> >
>
>
>


-- 
James Long
Coptix, Inc.
longster at gmail.com



More information about the Gambit-list mailing list