Skip to content

Support HttpDownloader Cancellation Behaviour/Reason #506

Open
@Sewer56

Description

@Sewer56

Improvement:

Currently

At the moment, the AdvancedHttpDownloader does not differentiate between a cancellation meant to suspend (pause) the current download and one to properly end the current download.

When the CancellationToken given to the AdvancedHttpDownloader is cancelled, the temporary files that contain the ongoing file data and progress remain on the disk.

This means that if a user opts to cancel a download, the incomplete preallocated files for the download persist on the disk, continuously occupying disk space for the foreseeable future.

We want

An API design and implementation that enables a download to be signaled with a 'cancellation reason', including at least a terminate and suspend option.

The terminate option should delete all temporary files, while the suspend option should retain them for potential future download resumption. This functionality needs to be supported at the IHttpDownloader abstraction level, which we employ for downloading assets. (Alternatively, we ditch SimpleHttpDownloader.)

Design

No proposal is made here; this is up for discussion; thus I labelled it as a 'spike' and 'discussion' issue.

We should however at minimum accommodate the requirements stated in the "We Want" section. These are necessary for our current usages of the downloader.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SpikeAn investigation taskmeta-discussionAn issue pertaining to a discussion

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions