[Zope] timeout, thread, and external connections

Warnes, Gregory R gregory_r_warnes@groton.pfizer.com
Mon, 6 May 2002 06:29:35 -0400


Dieter,

This sounds promising.  Where would you suggest that I look for
documentation about this?   So far, google has turned up
http://www.python.org/workshops/2000-01/proceedings/papers/fulton/zodb3.html
, and http://www.zope.org/Documentation/ZDG

>From that it looks like I will need to put the connection to the outside
process in a _v_something attribute, override the __getstate__ to properly
serialized the state of that process and __setstate__ to properly restore
the state.  

It seems that each zope thread may end up with a different copy of the
object.  For my purpose, this is not desirable.  Is there a way to ensure
that there is exactly one copy of my process wrapper?

Thanks,

Greg

> -----Original Message-----
> From: Dieter Maurer [mailto:dieter@handshake.de]
> Sent: Sunday, May 05, 2002 4:26 PM
> To: Warnes, Gregory R
> Cc: zope@zope.org
> Subject: Re: [Zope] timeout, thread, and external connections
> 
> 
> Warnes, Gregory R writes:
>  > ...
>  > Now, I want to the connection to the external process to 
> 'timeout' after a
>  > period of inactivity
> I would not worry about my own timeouts or my own process management
> but delegate that to the ZODB.
> 
>    When you assign a process wrapper for your process to a 
> "_v_" attribute,
>    then the wrapper instance is destroyed when the objects is flushed
>    from the ZODB cache. This would be a good time to kill the process.
> 
> 
> Dieter
> 


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.