                   isConfined: Bool,
                   queue callbackQueue: DispatchQueue?,
                   progress: ((_ completed: Int64, _ total: Int64) -> Void)?,
-                  completion: @escaping (Result<(data: Data, response: URLResponse?), ImagePipeline.Error>) -> Void) -> ImageTask {
+                  completion: @escaping (Result<(data: Data, response: URLResponse?), Error>) -> Void) -> ImageTask {
         let task = ImageTask(taskId: nextTaskId, request: request, isDataTask: true)
         task.pipeline = self
         if isConfined {

    func startImageTask(_ task: ImageTask,
                        callbackQueue: DispatchQueue?,
                        progress progressHandler: ((_ intermediateResponse: ImageResponse?, _ completedUnitCount: Int64, _ totalUnitCount: Int64) -> Void)?,
                        completion: ((_ result: Result<ImageResponse, ImagePipeline.Error>) -> Void)?) {
        guard !isInvalidated else { return }

        self.send(.started, task)

// Each task can be reuse of the same resource requested multiple times.

extension ImagePipeline {
    func makeTaskLoadImage(for request: ImageRequest) -> Task<ImageResponse, Error>.Publisher {
        decompressedImageTasks.publisherForKey(request.makeLoadKeyForFinalImage()) {
            TaskLoadImage(self, request)
        }
    }

    func makeTaskProcessImage(for request: ImageRequest) -> Task<ImageResponse, Error>.Publisher {
        request.processors.isEmpty ?
            makeTaskDecodeImage(for: request) : // No processing needed
            processedImageTasks.publisherForKey(request.makeLoadKeyForFinalImage()) {
