Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Download cancellation and progress reporting #575

Merged
merged 30 commits into from
Feb 6, 2018

Conversation

shana
Copy link
Member

@shana shana commented Jan 29, 2018

  • Added the ability to cancel downloads and progress reporting.
  • Fixed a typo
  • Made sure all tasks have the cancellation token set (so we can cancel at will)
  • Fixed calling the Finally in-thread handler - it wasn't getting called in all situations, which made things hang sometimes (namely when calling StartAwait).
  • Added a local http server to serve files for the download tests, so we don't have to rely on the network for such things and we can control exactly what comes down the pipe.
  • Renamed tests to explain what they're testing
  • Fixed logging of exceptions to log the inner exceptions as well, so we can see what got thrown where
    • As part of this, moved all GitHub.Logging classes to their own namespace GitHub.Unity.Logs so that it's easy to filter them out when outputting caller stacktraces
  • Exposed the web request timeout value as a property in ApplicationConfiguration (renamed from AppConfiguration for clarity), so we can tweak it during testing.
  • Exposed the web request timeout in the UI so users can tweak it (they're DNS or network might be very slow at resolving things)
  • Added a custom Progress class
    • The built-in System.IProgress<> interface is suited for a push model where the consumer sends in a IProgress object to be notified of changes (which might be useful for global progress notification), which doesn't suit our chaining callback system very well. The implementation in Rackspace.Threading does a Post to the main thread, so we really shouldn't be using it in our threaded model.

@shana shana force-pushed the shana/async-rollup-fixes branch 6 times, most recently from 4f55e12 to c8b9737 Compare January 31, 2018 13:14
@shana shana requested a review from StanleyGoldman January 31, 2018 13:36
@shana shana force-pushed the shana/async-rollup-fixes branch from 4b5939d to 6912577 Compare January 31, 2018 17:25
shana added 2 commits January 31, 2018 18:40
Kill some unused code in the task system, mainly the Defer paths
which we aren't using anymore
Add a way of calling different tasks depending on the success or failure
of the previous task.
Add some different ways of setting the result of a task beyond the
value returned by the previous task, mainly for seeding initial
values.
@shana shana merged commit 7b734a8 into enhancements/async-git-setup-rollup Feb 6, 2018
@shana shana deleted the shana/async-rollup-fixes branch February 6, 2018 14:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants