All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…
In April, we released the Async CTP Refresh, and since then we've seen fantastic adoption of the technology. We've also seen the technology landscape evolve. Windows Phone 7.5, aka "Mango", was released. Silverlight 5 has had both a Beta and an RC release. And there have been multiple patches to Visual Studio and the .NET Framework. All of these have led to some issues with the Async CTP, which many users have run into and let us know about on the forums.
To address all of these problems, we've just released v3 of the Async CTP. The installer has been tested with all known Visual Studio and .NET Framework patches. The AsyncCtpLibrary_Phone.dll has had the bad references removed so that it may be used to develop background agents. And the CTP includes a new AsyncCtpLibrary_Silverlight5.dll, which may be used with Silverlight 5 RC (AsyncCtpLibrary_Silverlight.dll is still included and may be used for apps using Silverlight 4).
(Especially for those of you that previously installed the Async CTP and that are planning to install the update, Lucian Wischik has some good information on his blog about handling common installation problems.)
Just wish it wouldn't install into c:\Users\<username>\AppData\local\Microsoft\VisualStudio\10.0\ProjectAssemblies\<blahblah>
Oh wait...then it put the Silverlight5 version in C:\Users\<username>\Documents\Microsoft Visual Studio Asyn CTP\Samples
What the... ?!?
Something wrong with Program Files (x86) or something.
Jerry, could you clarify please -- what is it installing into AppData\local\...\ProjectAssemblies\<blahbla> ? Nothing is supposed to go there. The installer is supposed to be installing all its files under MyDocuments.
(The reason it installs samples into MyDocuments is because we expected users to modify them, especially when following the walkthrough. We could have split things up, i.e. put the DLLs into ProgramFiles while the samples stayed in MyDocuments, but that started to feel messy...)
I was wondering... how do you treat Entity Framework with the Async CTP?
A typical scenario where Async CTP would be useful is a Web Service / Page where a lot of data is read / written. How could we use Async with EF in this scenario? I do not see how to solve the problem easily from your end since an LINQ query is by def differed and the real work occur on the first 'MoveNext' done on the Iqueryable. This is often done in a foreach loop or worst, hidden somewhere (e.g. DataSource = IQueryable).
In general, I would really like if you could do a post focused on what's available in the Framework as Async hooks. I mean, at the end of the day, few developpers will start coding task awaiters and most of us will simply leverage what's in the Framework, e.g. Download Async, File.Load Async, etc. and expose async methods leveraging those. So a blog post focusing on those primitives would be great.
Keep up the great work otherwise!