asynchronous

Implementing PreRequestHandlerExecute and multiple asynchronous calls

I'm having trouble getting this to work correctly. It seems that if I shoot off multiple asynchronous calls in the begin function, no matter what I do, I only get one of them in the end function. How can I set this up to do more than one call? If I use the same callback for all function, they all complete (I can write to a file and all ...

GWT-RPC vs HTTP Call - which is better??

I am evaluating if there is a performance variation between calls made using GWT-RPC and HTTP Call. My appln services are hosted as Java servlets and I am currently using HTTPProxy connections to fetch data from them. I am looking to convert them to GWT-RPC calls if that brings in performance improvement. I would like to know about pro...

ASP.NET AJAX weirdness

Ok, I thought I understood these topics well, but I guess not, so hopefully someone here can clear this up. Page.IsAsync seems to be broken. It always returns false. But ScriptManager.IsInAsyncPostBack seems to work, sort of. It returns true during the round trip for controls inside UpdatePanels. This is good; I can tell if it's a pa...

How do I pass a reference type to Control.Invoke / display a form centered on the main form

I'm on a thread other than the UI thread and need to display a modal form that's centered on the application's main form. What I usually do is use the width and height of the main form and the modal form to calculate the location, then use the PointToScreen method of the main form to get the location of the modal form. Since I'm on anoth...

Dojo fetch, how to wait on two simultaneous async fetches?

Hey guys, im not well versed in dealing with asynchronous design patterns, and im having a problem writing a script that does two async data fetches. Im using Dojo.data.api.Read.Fetch() to make two fetch() calls from seperate databases. The reulsts come back asynchronously. However, I have to cross reference the results, so i want my s...

Calling web service asynchronously still hangs application

I have an aspx page with three input buttons. The first button, using javascript/ajax, fires off a call to an IHttpAsyncHandler. The Handler calls a web service on another server (which generates a report and returns the path to the report file). In the ajax callback, XmlHttp.responseText returns the proper path and a window.open(pat...

multiple URLLoader

I am loading multiple xml files with URLLoader. for (var i=0;i<xmlCount;i++) { loadXML(xmlFiles[i], i); } public function loadXML(req:String=null, _id:Number=0):void { var loader:URLLoader = new URLLoader(); loader.addEventListener(ProgressEvent.PROGRESS, function a(e:ProgressEvent) {XMLLoadProgress(e, _id)...

Can a yui aSync Request send objects as parameters?

Is there a way that you can pass in a javascript object to a yui aSync request or does it only accept a URI? ...

Tagging page tracker event using the Async google analytics

In the old GA.js I was doing this: <script type="text/javascript"> pageTracker._trackPageview("/Page/About_Us/"); </script> What is the equivalent using the asynchronous analytics code? ...

How can I execute WPF filters on a background thread?

Hi, I'm using filters in WPF and I'm following the pattern suggested here. To summarize, this involves a text property being exposed on the ViewModel which represents the text to filter by. When the property is set (by the binding from the textbox in the View) it uses CollectionViewSource.GetDefaultView(MyItems).Filter = blah to filter...

Creating futures using Apple's GCD

I'm working on a library which implements the actor model on top of Grand Central Dispatch (specifically the C level API libdispatch). Basically a brief overview of my system is as such: Communication happens between actors using messages Multicast communication only (one actor to many actors) Senders and receivers are decoupled from o...

Drag and Drop in Silverlight with F# and Asynchronous Workflows

Hello everyone! I'm trying to implement drag and drop in Silverlight using F# and asynchronous workflows. I'm simply trying to drag around a rectangle on the canvas, using two loops for the the two states (waiting and dragging), an idea I got from Tomas Petricek's book "Real-world Functional Programming", but I ran into a problem: Unl...

WCF: Server Not Found - from trace Empty Message when run async but works fine from console app?

Todays cause of hair loss has been the following scenario: I have a service that takes 2 strings and returns another. This service uses basicHttpBinding <basicHttpBinding> <binding name="basicHttpNoSec"> <security mode="None" /> </binding> </basicHttpBinding> Anyway, it works fine from a console test app. I have a silverlig...

API verbs for an interruptible operation

I have a long running task as part of my application. The task can be started, paused, resumed, and cancelled. I'm trying to find the best interface for these operations. Two seem clear: Pause and Cancel. This leaves the start and resume operations. I could include both Start and Resume. This has the downside of either requiring the API...

How do I return a variable from Google Maps JavaScript geocoder callback?

I am working with the google maps API and whenever I return the variable to the initialize function from the codeLatLng function it claims undefined. If I print the variable from the codeLatLng it shows up fine. var geocoder; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(...

Orchestrating cancellation in long-running unit test

I am writing unit tests for the "glue" layer of my application, and am having difficulty creating deterministic tests for asynchronous methods that allow the user to cancel the operation prematurely. Specifically, in a few async methods we have code that reacts to the cancellation of the call and ensures that the object is in the prop...

What happens if an asynchronous delegate call never returns?

I found a decent looking example of how to call a delegate asynchronously with a timeout... http://www.eggheadcafe.com/tutorials/aspnet/847c94bf-4b8d-4a66-9ae5-5b61f049019f/basics-make-any-method-c.aspx. In summary it uses WaitOne with a timeout to determine if the call does not return before the timeout expires. I also know that you s...

Get Asynchronous HttpResponse through Silverlight (F#)

I am a newbie with F# and SL and playing with getting asynchronous HttpResponse through Silverlight. The following is the F# code pieces, which is tested on VS2010 and Window7 and works well, but the improvement is necessary. Any advices and discussion, especially the callback part, are welcome and great thanks. module JSONExample open ...

ASP.NET MVC 2 Cancel Asynchronous Action

The MSDN documentation for using an asynchronous controller mentions choosing an asynchronous controller when you want to provide a way for users to cancel requests. I couldn't find any documentation related to actually allowing users to cancel asynchronous requests, however. Is there a way to indicate to ASP.Net and/or the MVC framewo...

POST body in Node.js and some asynchronous condition check.

I want to get request (POST) body from http.ServerRequest, but do so not straight when my request function is called, but only after some time (Redis query). I have a very simple example to illustrate: var http = require('http'), sys = require('sys'); http.createServer(function (req, res) { sys.puts("Got request"); req.pau...