Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

stephentoub
Copy link
Member

Searched through tests for usage of StartNew and ContinueWith.

  • Replaced StartNew calls with Task.Run when the parameters to StartNew were all the defaults used by Task.Run or where no scheduler was specified but should have been. (I also changed one or two places to use Task.Run where LongRunning had been specified, but where using LongRunning with the default scheduler would have resulted in thousands of threads getting created).
  • Ensured remaining StartNew and ContinueWith calls were all targeting TaskScheduler.Default explicitly.

Searched through tests for usage of StartNew and ContinueWith.
- Replaced StartNew calls with Task.Run when the parameters to StartNew were all the defaults used by Task.Run or where no scheduler was specified but should have been. (I also changed one or two places to use Task.Run where LongRunning had been specified, but where using LongRunning with the default scheduler would have resulted in thousands of threads getting created).
- Ensured remaining StartNew and ContinueWith calls were all targeting TaskScheduler.Default explicitly.
@nguerrera
Copy link
Contributor

LGTM.

@nguerrera
Copy link
Contributor

I'll merge this and then merge v1 to master. Lots of goodnes in v1 today.

nguerrera added a commit that referenced this pull request Jan 30, 2015
Update usage of StartNew/ContinueWith in tests
@nguerrera nguerrera merged commit 56b2531 into dotnet:v1.0 Jan 30, 2015
@stephentoub stephentoub deleted the fix_task_tests branch January 30, 2015 21:54
@karelz karelz modified the milestone: 1.0.0-rtm Dec 3, 2016
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.

5 participants