def get_torrent_collecting(self): self.sesslock.acquire() try: return SessionConfigInterface.get_torrent_collecting(self) finally: self.sesslock.release()