asynchronous

How does jQuery accomplish its asynchronous animations?

...or more specifically, how are they able to create animations via javascript, which is synchronous, without holding up the next javascript statement. It's just a curiosity. Are they using a chain of setTimeout()? If so, are they set early, each one with a slightly longer duration than the previous, and running parallel? Or are they be...

Dealing with data on multiple TCP connections with epoll

I have an application that is going to work like a p2p-software where all peer are going to talk to each other. Since the communication will be TCP i thought that I could use epool(4) so that multiple connections can be handled. Since each peer will send data very often, I thought that I will establish a persistent connection to each pee...

Cleanly handling AsyncTimeout on ASP.NET Async Page

According to this article The Begin Event Handler is Always Invoked The second impliciation of AsyncTimeout that I had not really internalized until recently is that the begin event handler for a registered async task is always invoked, even if the page has timed out before ASP.NET gets around to starting that task...

VB.NET DownloadDataAsync:

Hi everybody, I am having the worst trouble getting around a bug, and am hoping that I can get some advice on this site. In short, I am trying to make an asynchronous web service call from my VB.NET application. But my "client_DownloadDataCompleted" callback is NEVER being called when the download is complete. Here is my complete code: ...

Android AsyncTask in external class

I've been working on an app and I've managed to get the AsyncTask to work fine when it's an inner class, am refactoring the code so that the AsyncTask is a separate class on its own but am wondering how do I kill the ProgressDialog and start a new Activity once the task is completed successfully? I've tried starting a new Activity in the...

When and how does Asynchronous Google Analytics execute?

I'm switching over our site to use Asynchronous Google Analytics, and I'm curious about it's method of pushing events to the _gaq array. Near as I can tell, events are placed into a waiting pattern in _gaq while the ga.js script is being asynchronously downloaded. Do they fire once the script is downloaded, and how are post-document load...

Silverlight and problems with async call

Hi there, I have some code that works as follows: App.xaml calls a SetUp() method which populates a local collection using async calls and exposes the collection as a public property. That's all good. Now I make an instance of the first page in my Silverlight app like so private void Application_Startup(object sender, StartupEve...

List of evented / asynchronous languages

I'm working on a system than has to be pretty scalable from the beginning. I've started looking at / playing around with asynchronous/evented approaches to writing serverside code. I've played around with both ruby's EventMachine and node.js. EventMachine is cool, but doesn't have asynchronous file I/O, which I need. The interface is ki...

How to make the completion of php request start another request based on the result of the first?

A user is presented with a box. He enters a string and presses OK. He gets sent to the results page where there are some asynchronous calls to php scripts for the results. But, on the same page, there are other fields that also need to start a php request, but they need to have the result of the first request first. In other words, Pa...

difference between asynchronous calls and asynchronous io calls in .net

Using a delegate I can call any function asynchronously. From the documentation I understand this is done by queueing a workitem for the threadpool. One can also do asynchronous calls to IO functions (like reading from sockets, files, webpages, etc). I think (but I'm not sure) this does NOT spawn a workitem in the threadpool. Only after...

How can I cancel a database query in ASP.NET when the user's browser disconnects?

My ASP.NET (3.5) app allows users to run some complex queries that can take up to 4 minutes to return results. When I'm doing a long loops of code, I'll check Response.IsClientConnected() occasionally so I can end the page if the user closes their browser or hits the stop button. But when querying SQL Server, my .NET code is blocked at...

Resque or Gearman - choosing the right tool for background jobs

We are developing a web application wherein with about 50% of write requests, we end up pushing data to multiple data stores and inserting and updating significant number of records in those data stores. To improve the response time, we want to process such requests asynchronously in the background. Our web application is being written ...

Postgres : Post statement (or insert) asynchronous, non-blocking processing.

I'm wondering if it is possible, that after a collection of rows is inserted, to initiate an operation that is executed asynchronously, is non-blocking, and doesn't need to inform the originator of the request - of the result. I am working with large amounts of events and I can guarantee that the post-insert logic will not fail -- I jus...

WCF Async callback setup for polled device

I have a WCF service setup to control a USB fingerprint reader from our .Net applications. This works fine and I can ask it to enroll users and so on. The reader allows identification (it tells you that a particular user has presented their finger, as opposed to asking it to verify that a particular user's finger is present), but the de...

Asynchronous PHP request (not AJAX)

Hi I am developing an eshop application. I am using webservice to create Order in Oracle database and websvc will give a response (OrderNumber) and I will inform customer that his Order (OrderNumber) is generated My problem The creation of order is taking too much time in backend system and user is keeping refreshing the page, On each re...

What is asynchronous image downloading and how can I download too many images ?

I have too many images to be download from net into iPhone? How can I build an application using asynchronous image downloading?. ...

Best way to deal with sleeping in event handlers in a single-threaded API?

I'm using a non-threadsafe event API. wait() is called, and from that call, event handlers are dispatched. I want to be able to, within an event handler, "sleep" for some time. Currently, I have a scheduler that schedules functions to be called at a later time, and have a bit of a hack that lets me use Scheduler.Sleeper(some_ienumerator)...

How to perfrom Cross-Platform Asynchronous File I/O in C++

I am writing an application needs to use large audio multi-samples, usually around 50 mb in size. One file contains approximately 80 individual short sound recordings, which can get played back by my application at any time. For this reason all the audio data gets loaded into memory for quick access. However, when loading one of these f...

How to TDD Asynchronous Events?

The fundamental question is how do I create a unit test that needs to call a method, wait for an event to happen on the tested class and then call another method (the one that we actually want to test)? Here's the scenario if you have time to read further: I'm developing an application that has to control a piece of hardware. In order ...

Recommend a better way to turn synchronous methods to asynchronous in Java

In a classes are some methods that are run synchronously. I would like them to run asynchronously, the first idea was to wrap it, and use switch enum to decide which function should be called. But for every method called, I needed a new method in the wrapper class and a new enum. It looks like this: public class QueuedShow implements In...