Message6124

Author zyasoft
Recipients amak, gdoutch, zyasoft
Date 2010-10-03.16:41:27
SpamBayes Score 0.0021480308
Marked as misclassified No
Message-id <1286124088.13.0.369999475321.issue1660@psf.upfronthosting.co.za>
In-reply-to
Content
Ahh, this looks very interesting in socket.py, because it's not going to be threadsafe. We need to either synchronize the ref counting, or probably better yet just use an AtomicInteger. This definitely could explain the slow leak. I would work on it now, but I'm about to go to the zoo, so posting it here for now:

    def close(self):
        try:
            if self._sock:
                self.flush()
        finally:
            if self._sock:
                if isinstance(self._sock, _nonblocking_api_mixin):
                    self._sock.reference_count -= 1
                    if not self._sock.reference_count or self._close:
                        self._sock.close()
                elif self._close:
                    self._sock.close()
            self._sock = None
History
Date User Action Args
2010-10-03 16:41:28zyasoftsetmessageid: <1286124088.13.0.369999475321.issue1660@psf.upfronthosting.co.za>
2010-10-03 16:41:28zyasoftsetrecipients: + zyasoft, amak, gdoutch
2010-10-03 16:41:28zyasoftlinkissue1660 messages
2010-10-03 16:41:27zyasoftcreate