This covers the asynchronous programming support added to C# and VB in VS2012. This includes the async and await keywords.

learn more… | top users | synonyms

3
votes
2answers
74 views

Async and Error Handling

I need to delete a file when an error occurs during loading it. It is not allowed to perform async operations in a catch block. This has lead me to writing following code: ...
3
votes
1answer
59 views

Stopping a long-running asynchronous computation

I'm writing a program that will perform a long-running computation, gradually improving a solution. On top of that, there's a simple UI that basically allows the user to stop the computation (letting ...
4
votes
1answer
122 views

Writing highly asynchronous code

I am writing a new web service that will be performing a lot of large data load operations. To do so I am moving the data to a temporary table then merging the data in to the live data via a stored ...
4
votes
1answer
136 views

Async Queue Processing

I have a Queue that needs to try to process when anything updates in it (add, remove or update). However, I don't want any of the callers to wait while the ...
5
votes
1answer
157 views

Listen to multiple RabbitMQ queue by task and process the message

Single app which listen to multiple RabbitMQ queue and process the message. This is working fine but not sure this implementation is right one or I am missing something. Implementation is inspired ...
3
votes
1answer
150 views

Async TcpListener

I'm trying to implement a TcpListener using the TPL. I'm not sure If I'm doing everything correctly though. I'm trying to keep the code as small as possible as well. It all works fine in a console ...
1
vote
1answer
148 views

Simple async/await progress bar

In researching the new .NET Async and Await keywords in .NET 4.5, I created a simple example showing how to update a progress bar and a label while an async function is running. I also included how to ...
3
votes
1answer
255 views

Basic TCP server application in C# using async / await [closed]

I'm trying to get started with network and parallel programming in C#. I'm almost a complete novice in programming, so I'm looking for feedback on a small script I'm writing. The goal of the ...
7
votes
1answer
218 views

Using keywords async/await in database queries (Windows Phone 8)

I have a local database in Windows Phone 8 app. The app includes a lot of queries to the database and I don't want bad effect on the responsiveness of UI. For ...
1
vote
1answer
1k views

WPF async await TcpClient/TcpListener sample

I want to build a robust and highly scalable client server system. Here what I have so far(an echo server as my base of implementation) My Server ...
3
votes
1answer
267 views

Filtering a collection by an async result

I'm trying to do something like this: var loudDogs = dogs.Where(async d => await d.IsYappyAsync); The "IsYappyAsync" property would return a ...
1
vote
1answer
102 views

Converting a method to async

I have a method that calls a "bridge" for "TraderMarketInfo". When info is received, it checks if info IsSet and raises an event. I wan to make this method async. C# .NET4.0 VS2012 Original method: ...
5
votes
2answers
6k views

C# Console Chat Server - Async/Await, TcpClient/TcpListener, NetworkStream (async)

Just looking for feedback on correctness of my understanding of async/await. Curious about the Task.Run inside of the StartReceive() method. Resharper (or maybe just the compiler) warns against ...
1
vote
0answers
418 views

WCF using TAP without worrying about timeouts

I am really liking using the new TAP pattern in .net 4.5. And am updating some of my older projects to use it. One of the old patterns I used to use was to use EAP with WCF so I could have functions ...
2
votes
2answers
649 views

Asynchronous version of AutoResetEvent

This is my second attempt to create asynchronous version of AutoResetEvent. At first I tried to make it completely lock-less, but it turned out to be impossible. This implementation contains a lock ...
4
votes
1answer
3k views

C# 5 Async Await .Task.Factory.StartNew cancellation

I have the async code that implements cancellation token. It's working but Im not pretty sure if this is the right way to do it so I just want feedback about it. Here is the actual code: ...
2
votes
1answer
188 views

Am I using async C# correctly?

I have the following bit of code the calls out to two different command line components (each wrapped in their own Task) ...