VM Plugins initialisation/finalisation/callback

Tim Rowledge rowledge at interval.com
Tue Jun 22 01:47:39 UTC 1999


On Mon 21 Jun, Marc Nijdam wrote:

> Would it be possible to do something emacs-like and have a startupHook
> and shutdownHook, which are a list of functions that get called in
> "order" on startup and shutdown. The network module would register the
> networkShutdown function to do it's thing, etc, etc. Some utility
> functions to manipulate the list would be nice ofcourse... (eg,
> addStartupHook, addShutdownHook). 
I imagine that would be reasonable, though there always seems to be some ugly
order-dependence that creeps in :-( You'd need a clean hook to hang polling
related extension on as well, which is a bit ugly. Pretty soon after that you
get people wanting pre-poll, post-poll, pre-event-posting, pre-exit, post-
sneeze, etc etc.
At least the startup ones can be subsumed into the plugin's version of
setInterpreter; one small relief.
Perhaps a linked list of structures containing the poll function and shutdown
function pointers would do -- I'm already keeping a liked list of loaded
plugins and various housekeeping, so it wouldn't cost me much. What about other
VMs?
tim

-- 
IBM: Inane Brutish Merchandising
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list