<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def download_all(self, urls, dir_path):
 """ Download all the resources specified by urls into dir_path. The resulting file paths is returned. DownloadError is raised if at least one of the resources cannot be downloaded. In the case already downloaded resources are erased. """

        # TODO: Implement parallel download
        filenames = []

        try:
            for url in urls:
                filenames.append(self.download(url, dir_path))
        except DownloadError as e:
            for filename in filenames:
                os.remove(filename)
            raise e

        return filenames