VM Plugins initialisation/finalisation/callback

Marc Nijdam men at jaguar.fc.hp.com
Mon Jun 21 16:02:43 UTC 1999


Tim Rowledge <rowledge at interval.com> writes:

> b) any thoughts on nice ways to setup these functions without doing
> the gross hack and adding junk to the VirtualMachine struct?
> 
> My immediate needs would be met by adding a VM function that sets
> two function pointers for the poll and shutdown, but I don't really
> find that tasteful nor flexible. And it's too late at night for met
> to come up with anything neater on my own...

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). 

Don't know if you'd consider this adding junk to the VM struct though ;-()

Marc





More information about the Squeak-dev mailing list