[plt-scheme] Chaining exception handlers between threads
Thanks. Got it working following Robby's suggestion. Should the
documentation note that the uncaught-exception-handler is a
non-preserved value? I assume that's what is going on here.
N.
On Mon, Feb 25, 2008 at 5:40 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> You can also set the `uncaught-exception-handler' parameter.
>
> Matthew
>
>
>
> At Mon, 25 Feb 2008 11:13:36 -0600, "Robby Findler" wrote:
> > It is probably easiest to propogate the exceptions yourself:
> >
> > (thread (lambda () (with-handlers ((exn? (lambda (e) (channel-put
> > exn-chan e)))) ...whatever you were going to do...)))
> >
> > and then have the main thread wait on the exn-chan.
> >
> > If the main thread was doing useful separately from the other threads,
> > and you want to interrupt it somehow, I'd suggest not doing that, but
> > instead moving that work to a new child thread, but you may have other
> > reasons that that won't work, so a few more details might help.
> >
> > Robby