Need to call Runtime.stop() automatically
Right now, we require users to call Runtime.stop() or AbstractProcess.stop() explicitly at the end of a run to shut remote processes and RuntimeServices down.
However, people tend to forget this. Therefore we should overload the Runtime or AbstractProcess destructor to call stop automatically when these objects get garbage collected in the current user system process, i.e. when the user code finishes. This will become even more critical once the Runtime allocates actual Loihi systems.
Users should still be encouraged to call stop() explicitly as soon as they are done with their Lava processes but it should not be a requirement.
Was just trying this out but this does not seem to be working. For some reason the del never gets called if you just let a program finish.
I'll take another look. How did you try it out?
I'm working on a new tutorial with RunContinuous and non-blocking mode and I just omitted stop() at the end. I expected this not to matter because stop() should get called upon garbage collection but that did never happen. So perhaps something must prevent the script from finishing and garbage collecting the process on which stop() did not get called.