Re: Patches for review: vat shutdown

Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]>
Newsgroups gmane.comp.lang.e.general
Organization IT Innovation
Message-ID <1288347176.2173.14.camel@danebury>
I've applied the simpler changes, but I'd like some feedback on these
before committing them:

> 5. Added static Runner.whenDead() method to register a deadManSwitch
> 
> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/e185c8a1c8fed9344c521c215ec97c9cf701ff98
> 
> (not sure whether __reactToLostClient is the right method to call here)

First, is it OK to reuse the DeadManSwitch mechanism to shut down VatTP?
It's intended for notifying objects in other vats, but here we're
registering callbacks to be invoked in the dead vat itself, after
orderlyShutdown. Runner is "unsafe", so this isn't available to ordinary
E code, though.

I guess if the method is called "whenDead" then it should call the "run"
method on the callback, not "__reactToLostClient", so one of these names
needs to change.

> 6. Shut down VatTP automatically when its vat is shut down
> 
> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/940fe263450a6bb9c0a34674e23a94f2337749b3

VatTP already has some support for shutting down connections, but it
assumes that its vat is still running and tries to queue up
notifications on the dead vat.

My solution is to catch DeadRunnerException and ignore the problem. This
means that when a remote vat is orderlyShutdown(problem), its peers just
get "Socket closed", not the reported problem (which is OK for me).

To do a more polite shutdown, there would need to be a period between
the orderlyShutdown event getting processed by the Runner and the Vat
actually being completely shutdown and not processing events.

> 7. Added "?? shutdown vat @vat" updoc directive
> 
> http://gitorious.org/~tal-itinnov/repo-roscidus/it-innovation/commit/7d4f1c55705bef7abafe05fbcb0e688263be2ecd

This feels a bit hacky. I find the updoc code quite hard to follow. Is
there a cleaner way to add features like this?

Thanks,


-- 
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP

Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]
http://www.it-innovation.soton.ac.uk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.