def get_alloc_rate(self): self.dllock.acquire() try: return DownloadConfigInterface.get_alloc_rate(self) finally: self.dllock.release()