Questions tagged [asynchronous]

Asynchronous programming is simply allowing some portions of code to be executed on separate threads. It makes your applications perform better, be more responsive, and use the resources of the system they are running on to the fullest extent.

Filter by
Sorted by
Tagged with
2 votes
1 answer
3k 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 ...
psubsee2003's user avatar
1 vote
1 answer
5k views

Node.js Nested Callbacks, multiple requests

I'm making requests to Parse.com to 3 different objects that are needed to render a View. I'd like to know what's the general/best approach in cases like these in which there are multiple requests ...
Maroshii's user avatar
  • 173
3 votes
1 answer
276 views

A little "infile" Asynchronous Module Definition

I like the modular aspect of AMDs (Asynchronous Module Definition; see this Stack Overflow reply) and it's quite neat to structure JS. But I typically compile all my JS files into one JS file. ...
brillout's user avatar
  • 189
3 votes
1 answer
363 views

Asynchronous lightweight JSON API

I am writing a lightweight JSON API, and I come from a PHP background, so I have some questions/reviews about async node.js code. This is my code so far: main.js ...
onlineracoon's user avatar
2 votes
1 answer
783 views

Amazon S3 pass-through controller

I am building a website that uses Amazon S3 to host its image (and other) files. I require that images displayed on the website look like they come from my site and not from Amazon (so we are talking ...
shenku's user avatar
  • 121
1 vote
2 answers
430 views

A server response written in node/express/mongodb: does this look right?

This is my very very very first attempt to write anything meaningful in node. The client side is a simple form that has login, workspace, and simply saves them onto the database. It would have been a ...
Merc's user avatar
  • 567
7 votes
2 answers
11k 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? ...
jimjim's user avatar
  • 301
4 votes
2 answers
6k 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? ...
jeremywho's user avatar
  • 253
3 votes
1 answer
6k views

Efficient Album Cover loading for ListView

I have a list view which display in each view a Album's name, the associated Artist and the album art. Here is the code of my ListFragment which display this list:...
Jecimi's user avatar
  • 131
2 votes
1 answer
1k views

Datagrid not refreshing correctly with Async Ping VB .Net

I have an application coded in VB.NET that has a bunch of servers in a DataGridView and does a continuous asynchronous ping. If all the servers are up it refreshes great, but if one goes down and ...
Chris Schneider's user avatar
6 votes
1 answer
1k 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 ...
Paul Hadfield's user avatar
3 votes
2 answers
4k 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 ...
tugberk's user avatar
  • 295
5 votes
2 answers
17k views

Implementation of an asynchronous TCP/UDP server

I am trying to implement a TCP/UDP server so all I have to do is something like this: ...
Stuart Blackler's user avatar
6 votes
2 answers
1k views

Listener pattern implementation

In my project, I am doing asynchronous processes in almost every classes. To explain my problem, I have created a sample: ...
Vivart's user avatar
  • 161
36 votes
2 answers
6k views

Asynchronous network callback code

I did not get the job after submitting this piece of work in an interview, but I have no feedback to know what "BAD" things are inside this block of code. The requirements are: Connect to the ...
TheOneTeam's user avatar
6 votes
1 answer
6k views

Loading JavaScript files asynchronously

I need to get some scripts from the different social networking site and cache them. I want the function to be asynchronous, and non-blocking. I have settled with a script, but I am not really sure ...
Saif Bechan's user avatar
4 votes
2 answers
4k views

Async, callbacks, and closures

After having spent a month or two trying to learn JavaScript, especially functional programming, async, and closures, I finally get it. But I don't know if I'm writing elegant code... Specifically, I'...
Paul d'Aoust's user avatar
4 votes
1 answer
814 views

AsynTask example

As I was trying to demystify the Android AsyncTask functionalities, I wrote this sample app to test it. Please review my code and suggest possible improvements: ...
somenath mukhopadhyay's user avatar
2 votes
1 answer
3k views

Is this a safe/correct way to make a python LogHandler asynchronous?

I'm using some slow-ish emit() methods in Python (2.7) logging (email, http POST, etc.) and having them done synchronously in the calling thread is delaying web requests. I put together this function ...
Ry4an Brase's user avatar
8 votes
1 answer
463 views

Using Delegates and BeginInvoke with .NET 2.0 WebServices

I'm attempting to implement a simple long-polling/comet/reverse AJAX solution, and came across the concept of delegates, specifically with the BeginInvoke and ...
Ryan Kinal's user avatar
4 votes
1 answer
3k views

Asynchronous task runner

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 ...
kay.one's user avatar
  • 141
6 votes
2 answers
14k views

Asynchronous Sockets

I need to implement a TCP client application. The client and the server send messages to each other. I want to make this program scalable enough to handle connections to multiple servers at the same ...
Andrew's user avatar
  • 61
15 votes
1 answer
7k 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 ...
Rachel's user avatar
  • 251
4 votes
4 answers
3k 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 ...
alexn's user avatar
  • 183
10 votes
2 answers
2k views

Am I overlooking anything with this asynchronous read/write loop?

Here's my code: ...
John Gietzen's user avatar

1
7 8 9 10
11