[Zodb-checkins] CVS: StandaloneZODB/ZEO - trigger.py:1.1.8.3
Jeremy Hylton
jeremy@zope.com
Fri, 19 Oct 2001 14:58:59 -0400
Update of /cvs-repository/StandaloneZODB/ZEO
In directory cvs.zope.org:/tmp/cvs-serv7825
Modified Files:
Tag: zeo-1_0-branch
trigger.py
Log Message:
Add an __del__ that closes the pipe's file descriptors.
=== StandaloneZODB/ZEO/trigger.py 1.1.8.2 => 1.1.8.3 ===
def __init__ (self):
- r, w = os.pipe()
+ r, w = self._fds = os.pipe()
self.trigger = w
asyncore.file_dispatcher.__init__ (self, r)
self.lock = thread.allocate_lock()
self.thunks = []
+
+ def __del__(self):
+ os.close(self._fds[0])
+ os.close(self._fds[1])
def __repr__ (self):
return '<select-trigger (pipe) at %x>' % id(self)