TaskCompletionSource
- Posted: Nov 12, 2009 at 9:06 AM
- 41,812 Views
- 3 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
Learn more about the .NET Framework 4 and keep abreast of Parallel Computing tools and techniques via the Concurrency Dev Center.
See all videos in this series.
Comments Closed
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Very nice, thank you
Perhaps I need to do more research on the new Task APIs, but I didn't quite understand why we would use a TaskCompletionSource<T> instead of using the EAP functionality directly. Is it because the Task APIs give us better tooling/functionality than EAP?
Hi cgillum-
This was just an example Danny was providing on how TCS<T> could be used to represent any asynchronous operation, including EAP implementations. However, the compositionality provided by Task<T> now allows you to start doing some really useful things. For example, if you wanted to download a bunch of web pages asynchronously and then only do something when all of them were complete, with WebClient by itself you'd have to code up that logic manually; in contrast, if you had a Task<T> for each download, you could then use ContinueWhenAll to launch additional work when all of those downloads completed (and you'd get back a Task that represents that continuation). In short, once you have a Task<T> to represent the EAP operation, you can compose it with any other tasks you might have, and you have the full functionality afforded to tasks to process that EAP operation.
Remove this comment
Remove this thread
close