def _checkpid(self):
    if (self.pid != os.getpid()):
        with self._check_lock:
            if (self.pid == os.getpid()):
                return
            self.disconnect()
            self.reset()
def _checkpid(self):
    if (self.pid != os.getpid()):
        with self._check_lock:
            if (self.pid == os.getpid()):
                return
            self.disconnect()
            self.reset()