asynchronous

Asynchronous processing in SQL Server vs. .NET Asynchronous processing

What's is the advantage of using Asynchronous processing in SQL Server over .NET Asynchronous processing? Aren't they the same? I have a hard time to understand what is the benefit of using Asynchronous processing in SQL Server instead of .NET APM. I can easily wrap a SQL call in a lambda expression and do a BeginInvoke(...). Can someon...

Interacting with the UI thread from an Async callback method?

I have a method that is asynchronously called when System.Net.Sockets.NetworkStream.BeginRead completes. skDelegate = New AsyncCallback(AddressOf skDataReceived) skStream.BeginRead(skBuffer, 0, 100000, skDelegate, New Object) In that callback method, I need to interact with the UI thread. Sub skDataReceived(ByVal result As IAsyncRe...

Does PHP support asynchronous programming?

I'm new to PHP. I am familiar with ASP.NET which support asynchronous programming. That is, if one request needs to do some I/O job. It is suggested to program the web page with BeginProcess/EndProcess way. The asynchronous programming is key to improve scalability. I'm wondering whether there is counterpart of asynchronous programming(...

Asynchronous data loading in Entity-Framework?

Did anyone hear about asynchronous executing of an EF query? I want my items control to be filled right when the form loads and the user should be able to view the list while the rest of the items are still being loaded. Maybe by auto-splitting the execution in bulks of items (i.e. few queries for each execution) all in same connection...

Populating NSImage with data from an asynchronous NSURLConnection

I have hit the proverbial wall trying to figure out how to populate an NSImage with data returned from an asynchronous NSURLConnection in my desktop app (NOT an iPhone application!!). Here is the situation. I have a table that is using custom cells. In each custom cell is an NSImage which is being pulled from a web server. In order to ...

How to make asynchronous webservice call in C#?

Hi, This is about a tangled cluster of XHR and WebMethod (asmx). The pattern is simple, I make calls via XHR to Webmethod, but it seems WebMethod are sync not async. I just need to make this transition asynchronous. I am searching and searching (might be not good in search) but couldn't find anything that can resolve this mystery. Here...

Asynchronus File Upload with StateServer Mode

Hi Friends, I want to implement Asynchronus File Upload. I've tried ajax:AsyncFileUpload control. It's working fine only with InProc Mode. But I'm using StateServer Mode. Any help from anybody? Thanks in advance. Regards Debashis ...

Actionscript Wait For Asynchronous Event Within Function

Hello, I need a little help with asynchronous events in ActionScript 3. I am writing a simple class that has two functions, both of which return strings(logic and code outlined below). Due to the asynchronous nature of the AS3 HTTPService, the return value line is always reached before a result is returned from the service, yielding an...

async execution of tasks for a web application

A web application I am developing needs to perform tasks that are too long to be executed during the http request/response cycle. Typically, the user will perform the request, the server will take this request and, among other things, run some scripts to generate data (for example, render images with povray). Of course, these tasks can ...

Is Comet easier in ASP.NET with Asynchronous Pages?

I don't mean to ask, is Comet easier in ASPNET than in Jetty? I mean, is Comet easier inn either ASPNET or Jetty, as compared to other alternatives? I think the asynch capabilities of ASP.NET and Jetty specifically make Comet more scalable when implemented on those platforms and I'd like to confirm that. ASPNET introduced "Asynchrono...

Why only ASP.NET have asynchronous programming model?

I works with ASP.NET. IMHO, the asynchronous programming support in ASP.NET is beautiful. That is, we can have BeginXXXX/EndXXXX pair method to improve scalability for resource intensive task. For example, one operation needs to get huge data from database and render it on response web page. If we have this operation synchronous. The t...

Python: asynchronous tcp socketserver

I'm looking http://docs.python.org/library/socketserver.html to try and handle asynchronous requests with the socketserver in python. At the very bottom there is an example, but it doesn't make sense. It says you use port 0 which assigns an arbitrary unused port. But how do you know what port to use for the client if they are not in the ...

aio_write on linux with rtkaio is sometimes long

I'm using async io on linux with rtkaio library. In my tests everything works perfectly, but, in my real application i see that aio_write which is supposed to return very fast, is very slow. It can take more than 100 milis to write a 128KB to a O_DIRECT padded file. Both my test and the application use same I/O size, i check on the same ...

Is there any command to update UI immediately?

I want to update a progress bar from running 1 to 100 with this code. for (int i = 0; i <= 100; i++) { System.Threading.Thread.Sleep(100); progressBar1.Value = i; } But the result is, the UI freeze until looping finish. I know Dispatcher can help, but I don't want to split function. Is there any command to update UI immediat...

SmtpClient.SendAsync - How to ensure my application doesn't finish before callback?

Hi, I need to send emails asychronously through a console application. I need to do some DB updates on the callback but my application is exiting before the callback code gets run! How can I stop this from happening in a nice manner rather than simply guessing how long to wait before exiting. I would imagine the Async calls get placed ...

Google Maps: geocode addresses asynchronously, but get their responses in order

I'm trying to plot lines between two or more addresses in Google Maps. The idea is that addresses are in an array (in the order of the route taken), then the array is looped over and geocoded via Google Maps, so I then have an array of co-ordinates: function showRoute(routes) { var points = []; var geocoder = new GClientGeocoder...

Sequentializing and synchronizing a set of asynchronous web service calls

In my Silverlight class, I have to make a number of async method calls to a webservice. The silverlight class simply calls a number of these method calls, but I want them to actually be issued sequentially and synchronously. I can achieve this by chaining async calls in completion handlers in the silverlight class, but I want something ...

C# .. Asynchronous Sockets .. where is the State Object Stored?

Hi all, A simple question really, but one where I cannot find any anwsers too. When I execute an Asynchronous Socket operation, such as : socket.BeginSend ( new byte[]{6}, // byte[] | buffer 0, // int | data to send buffer offset 1, // in...

.NET End Invoke / Post Operation Completed

My question involves async operations in VB .NET. Given the following: Delegate WorkerDelegate(Byval asyncOp As AsyncOperation) Public Sub StartWork() Dim worker as new WorkerDelegate(AddressOf DoWork) Dim asyncOp as AsyncOperation = AsyncOperationManager.CreateOperation(New Object) // begin work on different th...

Not calling Delegate.EndInvoke can cause memory leak... a myth?

There have been a lot of discussion around this and everyone tend to agree that you should always call Delegate.EndInvoke to prevent a memory leak (even Jon Skeet said it!). I always followed this guideline without questioning, but recently I implemented my own AsyncResult class and saw that the only resource that could leak is the Asyn...