Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out join() and Drop behavior for DownloadHandle #65

Closed
2 of 3 tasks
graebm opened this issue Oct 17, 2024 · 1 comment
Closed
2 of 3 tasks

Figure out join() and Drop behavior for DownloadHandle #65

graebm opened this issue Oct 17, 2024 · 1 comment
Assignees

Comments

@graebm
Copy link
Contributor

graebm commented Oct 17, 2024

Currently, DownloadHandle has a join() function, but neither cp.rs or the benchmark runner bother to call it. It was added because UploadHandle has a join(), and we thought the APIs should be similar.

But DownloadHandle::join() cancels the download, while UploadHandle::join() waits for the upload to successfully complete, and has a separate UploadHandle::abort() function. Should we rename DownloadHandle::join() to DownloadHandle::abort()?

Also, what's the Drop behavior for DownloadHandle? We should probably ensure its spawned tasks get cancelled ASAP. Likewise for UploadHandle/UploadObjectsHandle/DownloadObjectsHandle

  • Drop and cancel for UploadHandle/UploadObjectsHandle (PR)
  • Drop and cancel for DownloadHandle (PR)
  • Drop and cancel for DownloadObjectsHandle (PR)
@ysaito1001
Copy link
Contributor

ysaito1001 commented Dec 5, 2024

This issue can be closed once all subtasks have been completed. As a result of the subtasks, here is a summary:

--- Join Abort Drop
DownloadHandle there is no join, but drainconsumes the body cancels in-progress tasks ASAP but gracefully futures for in-progress tasks are destroyed at whatever await points
UploadHandle waits for completion of spawned tasks ditto ditto
DownloadObjectsHandle waits for completion of spawned tasks ditto ditto
UploadObjectsHandle waits for completion of spawned tasks ditto ditto

@waahm7 waahm7 closed this as completed Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants