5
votes
1answer
42 views
7
votes
2answers
1k views

A blocking buffer manager to provide segments of a byte array

Since asynchronous operations (like Socket's Begin*-End* pairs and ...
1
vote
1answer
81 views

Async method with multiple tasks

I'm trying to make my ASP.net Web API methods asynchronous. This method is in the Business Logic layer of my N-tier. I'm waiting for the result from my 1st task and use it on the 2nd task, but I ...
3
votes
1answer
1k views

Making async SQL calls

I've written a class to make async SQL calls and it appears to work like a charm! But I'm a bit concerned about what it means to send a lot of queries to the server and then aborting them by throwing ...
3
votes
2answers
75 views

Asynchronous Pattern

I have an n-tier solution which consist of DAL,BL and a ASP.net WebAPI project. I'm new with Asynchronous Pattern and I'm trying to add it to my Framework. Am I doing asynchronous pattern correctly? ...
3
votes
1answer
157 views

AsyncPages in ASP.NET 2.0

I'd like a review of this implementation of Async in ASP.NET 2.0 web form page below. Let me know if I am missing something. AsyncPagesASPNET20.aspx ...
6
votes
2answers
2k views

File Async writer using Tasks or new features of .Net 4.5?

This code was posted as answer to Async file writer in .Net 3.5. How would it be done better using Tasks or new features in .Net 4.5? ...
1
vote
1answer
122 views

Async Log4net logging handler - High CPU usage on async call

I've got a LoggingMessageHandler that incoming requests on my WebApi application filter through. ...
2
votes
2answers
1k views

Asynchronous SSLSTREAM

Recently I have written an SslStream class asynchronously authenticate clients and receive message from them. I still would like anyone to suggest improvements for ...
6
votes
2answers
171 views

Interface implementations: sync methods in terms of async methods

Say I have an interface and I want to expose both synchronous and asynchronous options for performing an action: ...
2
votes
0answers
45 views

Thread Safe Events while utilizing EAP

This is my code for a server using EAP (Sockets). Is AsyncOperation.Post is the right way to raise thread safe events? AsyncOperation.Post states: Invokes a delegate on the thread or context ...
5
votes
2answers
8k views

TCP async socket server client communication

I develop my first async TCP socket server and client program in c# and would like to review the first parts of it. I like to get some information’s about smelly code that I missed and what I could ...
5
votes
1answer
341 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 ...
3
votes
2answers
2k views

Old-way of asynchronous programming in ASP.NET MVC 3

On ASP.NET MVC, I try to write an async Controller action with the old asynchronous programming model (actually, it is the current one, new one is still a CTP). Here, I am trying to run 4 operations ...
7
votes
1answer
535 views

Continuously receive messages async from Azure Service Bus Queues

I'd like to get input on my approach of continuously receiving messages from an Azure Service Bus queue using the async part of the library. My main concern being whether its "safe" to use ...
10
votes
2answers
714 views

BackgroundWorker vs TPL ProgressBar Exercise

I wanted to fiddle around with the BackgroundWorker and Task classes, to see how I would implement a given task with these two ...
10
votes
2answers
6k views

Real World Async and Await Code Example

I have been looking everywhere to find good real world examples of the new Async and Await features in .net 4.5. I have come up with the following code to download a list of files and limit the number ...
2
votes
1answer
292 views

Generic Task Progress Dialog

I'm attempting to write a Progress Dialog that I can instantiate, show and then pass a task to complete to. I'm pretty new to Task Based Patterns, so please bear with me. Ideally my goal is to be ...
6
votes
3answers
252 views

“Proper” Asynchronous implementation

I need some opinion if my code below is proper for an async process. This code only reformats text. Please let me know if this implementation is not proper or needs some improvement. ...
2
votes
1answer
457 views
2
votes
1answer
198 views

DAL Efficiency Help

I am attempting my first try at some c#. So far I love it, (not more than vb tho ;)) however, I am wondering if I can make these classes a bit more efficient. Please note ###Test is my attempts at ...
4
votes
2answers
2k views

Async file writer in .Net 3.5

I'm curious what people think about this little bit of logging code. It seems to work ok. Is there anything I'm missing? ...
1
vote
2answers
671 views

Static classes, singleton and thread-safety

I have a classes for work with a web service (Windows Phone 8 app). I will briefly describe what doing each. My main question is the thread-safety of the ...
2
votes
2answers
819 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 ...
1
vote
0answers
477 views

Asynchronous Server Sockets - Thread-Safety/Performance (MMO Gaming)

I'm writing this game server for my small 2D MMO game. So here are my questions: What do you think about the Thread-Safety of the code? Please explain how can it be made thread-safe / show example/ ...
1
vote
0answers
471 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 ...
6
votes
1answer
154 views

AutoResetEventAsync, am I missing something?

So I wrote an asynchronous version of AutoResetEvent: ...
2
votes
1answer
204 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) ...
2
votes
1answer
3k views
1
vote
1answer
956 views

TPL Thread Leak and Memory Leak

I'm trying to track down what I suppose to be memory/thread leak in one of my programs. My program uses a function to upload a file to a Windows Azure Storage Blob. In order to make this function ...
2
votes
3answers
286 views

(async) Task “Keeper” for keeping the “fresh” data - How do I improve this?

Background I retrieve data from a 3rd party API, over HTTP. It's often slow, and sometimes just fails. I needed a class that would keep getting data from that source, and keep it in memory. So, ...
2
votes
1answer
5k views
2
votes
3answers
465 views

Polling a email using async / await

I've created a create a console app that would: Call a method to check an email account (I've done this step) Convert the attachment to pdf (I've done this step) Then once the conversion is complete ...
8
votes
4answers
1k views

Code works but memory usage is erratic

I have the following class which is a tool for retrieving MD5 hashes of files that are input into it. They can potentially be very large files and I require cancellation and progress report, hence why ...
3
votes
2answers
1k views

“Singleton” task running - using Tasks/await - peer review/challenge

My app saves data to a file - I obviously don't want the app to write to the file from multiple locations on disk. What I want is a generic "utility" class that will know how to run a piece of code ...
1
vote
0answers
722 views

Cancelling Local WebClient ASync Operation

I had previously asked this question on SO. The answer pointed me towards using the task parallel library for multiple parallel downloads. I'm not actually utilizing this exact code, but it got me ...
1
vote
0answers
300 views

Amazon s3 pass through controller [closed]

Some background, I am building a website that uses amazon s3 to host its image (and other) files. I required that images displayed on the website look like they come from my site and not from amazon ...
14
votes
1answer
5k views

What is better for Lazy-Loading Navigation Properties of detached Self-Tracking Entities through a WCF service?

I have a WCF client which passes Self-Tracking Entities to a WPF application built with MVVM. The application itself has a dynamic interface. Users can select which objects they want visible in their ...
2
votes
0answers
499 views

MVC Async Action Invoking Workflow

I've just started working with Workflow (WF4) and have been playing with an idea of using it in MVC3.0 controller actions to see if it improves the maintainability of complex actions; also potentially ...
3
votes
2answers
6k views

Is this implementation of an Asynchronous TCP/UDP Server correct

I am trying to implement a TCP/UDP server so all I have to do is something like this: ...
3
votes
1answer
1k views

Asynchronous task runner: How can it be improved?

This is my personal project. This class is responsible for running jobs asynchronously that are registered using dependency injection. All improvement suggestions are welcome. It can be as small as ...
3
votes
4answers
1k views

Asynchronous website monitor

I have a class which is responsible for checking whether a website is up or down. I've made it to run asynchronously, but I would like critique if this is a good/bad way or if there is another better ...