async-ctp Questions

3

Solved

I have this async method inside ASP.NET MVC 4 WEB API Controller that I got from this blog: http://www.strathweb.com/2012/04/html5-drag-and-drop-asynchronous-multi-file-upload-with-asp-net-webapi/ ...
Placeman asked 11/8, 2012 at 13:33

1

Solved

I have one asynchronous method: public async Task<BitmapSource> GetBitmapAsync(double[] pixels); Let's say I also have this class: public class PixelData { public double[] Pixels { get; ...
Aperient asked 8/8, 2012 at 8:2

1

Solved

In C# with async ctp or the vs.net 2011 beta we can write recursive code like this: public async void AwaitSocket() { var socket = await this.AcceptSocketAsync(); //await socket and >>retur...
Wyn asked 30/5, 2012 at 10:30

3

Solved

Using latest CTP5 with async/await keywords, I wrote some code, which apparently cannot compile: class Program { public class MyClass { async public Task<int> Test() { var result = aw...
Reunionist asked 21/7, 2011 at 7:42

3

Solved

The way I understand it, The new Async-Await functionality in the C# 5 CTP should be all implemented in the compiler. This should mean that code compiled with the CTP should be able to run on vanil...
Chatelain asked 2/11, 2010 at 20:55

5

Solved

I'm currently starting to create an application that would profit a lot from C# 5's async-await feature. But I'm not sure which version of VS and of the async runtime to use. Looking at OS popular...
Penult asked 2/2, 2012 at 10:11

3

Solved

I'm converting some async/await code to chained tasks, so I can use it in the released framework. The await code looks like this public async Task<TraumMessage> Get() { var message = await ...
Sturrock asked 30/7, 2011 at 16:29

2

Solved

I am trying the async CTP, the versión 4.5 that allow use async methods without needing to write the Begin/End methods. My first probe is to execute an async method that return void. I see a few e...
Boatel asked 6/4, 2012 at 11:37

5

Solved

I recently read an article about c#-5 and new & nice asynchronous programming features . I see it works greate in windows application. The question came to me is if this feature can increase AS...
Mascle asked 26/3, 2012 at 5:24

3

I have been playing around with the new async CTP and MVVM patterns. I have been converting an old program of mine that was using a background worker and report progress to update a collection in m...
Preliminaries asked 10/12, 2011 at 22:8

3

I'm trying to understand when to use TaskEx.Run. I have provided two code sample i wrote below that produce the same result. What i fail to see is why i would take the Task.RunEx TaskEx.RunEx appro...
Hydrosome asked 17/2, 2012 at 20:17

1

Solved

Attempting to write a HTML crawler using the Async CTP I have gotten stuck as to how to write a recursion free method for accomplishing this. This is the code I have so far. private readonly Conc...
Willey asked 13/2, 2012 at 11:28

4

Solved

Browsing through the channel 9 msdn videos I found the following unanswered comment and was hoping someone could possibly explain it? I dont get the point of the async keyword. Why not just all...
Macmullin asked 10/2, 2012 at 9:46

2

Solved

I don't really understand why await and async don't improve the performance of my code here like they're supposed to. Though skeptical, I thought the compiler was supposed to rewrite my method so ...
Ammadis asked 15/1, 2012 at 23:58

2

Solved

Here is an article on how the Async CTP refresh can take advantage of the async "fast path". It mentions things like greater efficiency etc, but I dont even know what the "fast path" is? I would l...
Photozincography asked 7/1, 2012 at 11:29

1

Solved

I'm currently working on a largely asynchronous application which uses TAP throughout. Every class which has methods for spawning Tasks also has a TaskScheduler injected into it. This allows us to ...
Electrolysis asked 6/1, 2012 at 15:36

2

Solved

Last month I asked the following question which resulted in my learning of TaskEx.Yield: Can async methods have expensive code before the first 'await'? However, I have since realized tha...
Goodwill asked 5/1, 2012 at 12:31

1

Solved

I am using the Async CTP library for Windows Phone. Does anyone know how to cancel a pending webrequest? Request = (HttpWebRequest)WebRequest.Create(url); Request.Credentials = new NetworkCredenti...
Fine asked 26/12, 2011 at 12:21

2

Solved

Is it bad to have expensive code at the start of an async method, before the first await is called? Should this code be wrapped with a TaskEx.Run instead? public async Task Foo() { // Do some ini...
Tempi asked 9/12, 2011 at 17:9

2

Solved

A few related questions about the async CTP: I can iterate over an Iterator Block (an IEnumerable<T> yield-returning T) using GetEnumerator() and then enumerator methods MoveNext(), and Cur...
Berglund asked 8/12, 2011 at 14:56

1

Solved

With Iterators, the following generic delegate is possible: public delegate IEnumerable<TOut> MyDelegate<TIn>(TIn param1); With the new async/await in C# 5.0 CTP, I expect to be able...
Penates asked 6/12, 2011 at 21:39

2

I have a method which takes long to run: it calls the DB and makes certain calculations synchronously: public static MyResult MyMethod(int param1, int param2) { // run a DB query, wait for result...
Gladdy asked 22/11, 2011 at 5:29

6

Solved

How would you implement something that works similarly to the Async CTP await keyword? Is there a simple implementation that works like await in all cases, or does await require different implement...
Makell asked 23/3, 2011 at 6:24

3

Solved

I am trying to see how new C# 5.0 asynchronous (CTP) features will work. I also use ReSharper. But because it is only a CTP, ReSharper doesn't support new keywords (async/await) and highlights them...
Reserved asked 14/5, 2011 at 17:10

4

Solved

In looking at various C# Async CTP samples I see some async functions that return void, and others that return the non-generic Task. I can see why returning a Task<MyType> is useful to return...

© 2022 - 2024 — McMap. All rights reserved.