[Zope-dev] volatile state maintenance
Sam Gendler
sgendler@silcom.com
Sun, 09 Apr 2000 22:56:05 -0700
Is there an opposite function to __setstate__, which would allow me to
close the connection before it gets blown away. I am fairly certain
that the connection will close during garbage collection, but it is
better to be safe than sorry. Also, what are the valid values for the
state variable.
I will check the ZQR after I send this, and let you know if I have found
the answers. If you don't hear from me, I am still in need.
--sam
>
> def _gethandle(self):
> if self._v_handle is None or notvalid(self._v_handle):
> self._v_handle = metakitconnect()
> return self._v_handle
>
> def __setstate__(self,state):
> "Initialize on reload from ZODB"
> self._v_handle = None
> self._gethandle()
>
> --
> ___
> // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au
> // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au
> //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen