asynchronous

Asynchronous Calls Newbie Question

Good Day, I am working on a small project where I need to make two asynchronous calls right after another. My code looks something like this: AsynchronousCall1(); AsynchronousCall2(); The problem I'm having is that both calls take anywhere from one to two seconds to execute and I never know which one will finish last. What I'm looki...

Python: simple async download of url content?

I have a web.py server that responds to various user requests. One of these requests involves downloading and analyzing a series of web pages. Is there a simple way to setup an async / callback based url download mechanism in web.py? Low resource usage is particularly important as each user initiated request could result in download of...

execute function on completion of another, use ajaxComplete()?

Hi there, two functions need to be executed in Javascript, the second one only after the first has finished. The first populates an array with getJSON, and the second will then manipulate it. However, getJSON is asynchronous, thus it will not pause the order of execution to make the program work properly so that the array finishes load...

Running an asynchronous operation triggered by an ASP.NET web page request

I have an asynchronous operation that for various reasons needs to be triggered using an HTTP call to an ASP.NET web page. When my page is requested, it should start this operation and immediately return an acknowledgment to the client. This method is also exposed via a WCF web service, and it works perfectly. On my first attempt, an ...

Starling: How to speed up the queue

I've launched a website today which makes heavy use of Starling and Workling to handle the background task queue. Traffic has been heavy and although my server CPU/memory has not been under too much strain, the job queue is seriously backing up. I am inexperienced with both Starling and Workling and urgently need to understand how I ca...

Best way to set the selection of a flex control that hasn't initialized yet

To illustrate the Q. I'll really over-simplify the example (in reality the code is much more convoluted). Say you have a flex control, which underneath contains a datagrid. Something like <mx:DataGrid id="grid" dataProvider="{document.items}"> <mx:columns> <mx:DataGridColumn headerText="Column 1" dataField="@name"/> <mx:D...

How to Invoke and use WSAAsyncSelect() in C#?

Hello, I edited my question when I set the bounty. I want to Invoke/DllImport WSAAsyncSelect() from WinAPI and use it much like I use it in Delphi/C++ For example - Delphi //Async CallBack handler Declaration procedure MessageHandler(var Msg:Tmessage);Message WM_WINSOCK_ASYNC_MSG; //Where i setup the Async dwError := WSAAsyncSelect(S...

TCP client Asynchronous socket callback

Hello, Please note the question is about using an asynchronous callback mode only on sockets! I want to build a TCP client that will notify me when a packet is received and when i the socket is being closed,because the feautures that NET offers with beginRecv,endRecv doesn't inform if the connection is still available. My question: Is...

Simple solution needed for jBPM asynchronous continuations in Seam environment

I have a Seam application that kicks off business processes. At the moment there is no other application or component that needs to co-ordinate, there is just the one web app. I'd like to use asynchronous continuations in the business processes, but at the moment if I do the process just sits there inactive and the relevant actions are ...

Objective-C Asynchronous Web Request with Cookies

I am writing a program in Objective-C and I need to make web requests to web server, but asynchronously and I am fairly new on mac, I am very good at windows technologies, but I need to know that if I use NSOperation (introduced in 10.5, i am assuming that it will not run in 10.4 MAC?), or if it was implemented such that it utilizes syst...

Javascript/ajax/php question: sending from server to client works, sending from client to server fails.

Hey All, Sorry for reposting(Admins, please delete the other one!). since you guys have been a great help, I was kinda hoping that you could help me once again while having the following question: I am currently trying to work with AJAX by allowing a managerclass in PHP to communicate via an XmlHttpobject with the javascript on the clie...

What's wrong on following URLConnection?

See also: Objective-C Asynchronous Web Request with Cookies I spent a day writing this code and can anyone tell me what is wrong here? WSHelper is inherited from NSObject, I even tried NSDocument and NSObjectController and everything.. -(void) loadUrl: (NSString*) urlStr{ url = [[NSURL alloc] initWithString:urlStr]; reque...

When to use asynchronous operations in asio

When should I use asynchronous operations in boost::asio instead of synchronous operations in seperate threads? ...

Is there an async version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet?

Is there an asynchronous version of DirectoryInfo.GetFiles / Directory.GetDirectories in dotNet? I'd like to use them in an F# async block, and it'd be nice to have a version that can be called with AsyncCallbacks. Problem is I'm trying to suck in a bunch of directories, probably on SMB mounts over slow network connections, and I don...

Does IIS or ASP.NET do any sort of connection throttling?

Hello, I am trying to create an ASP.NET Web Service which I can use to show the difference between implementing a Web Method asynchronously vs. synchronously. It is sort of a proof-of-concept that I can use to show how writing things asynchronously can make an app more scalable. To make the comparison, I implemented two methods, RunSq...

Updating UI from a different thread

Hi, I know this question has been asked before, but I feel it wasn't asked correctly. I have an intensive operation and I'd like the UI to remain responsive. I've read a few posts that say Background worker is the best way to go, however, I think this assumes you have the source code to the intensive task. I have a library that I have...

Only implement an ASP.NET WebMethod asynchronously if you can parallelize?

In this MSDN article (Chapter 6 — Improving ASP.NET Performance), it says the following: "Avoid Asynchronous Calls Unless You Have Additional Parallel Work Make asynchronous calls from your Web application only when your application has additional parallel work to perform while it waits for the completion of the asynchronous cal...

New to FLEX - translating asynchronous comms from Java

Hi, I'm currently translating a Java project to Flex 3. A large part of the project involves asynchronous communications. The program will connect to a stream, start downloading data. Shortly after connecting, it will need to download context data in the same format (a keyframe) by HTTP. At various points during the stream or keyframe,...

Can an async I/O throw an uncatchable exception?

I have a multi threaded .NET app that uses async I/O and AsyncCallbacks to handle the I/O completions. Rarely, the app will fail with an exception like: Arithmetic operation resulted in an overflow. at MyApp.ReadComplete(IAsyncResult ar) in c:\MyApp.cs:line 123 at System.Net.LazyAsyncResult.Complete(IntPtr userToken) at System...

Client-Side entity creation with related code tables

I’m on the learning curve up the Silverlight trail. I’m a data-centric developer so I naturally picked up the ADO.NET Data Services client along the way. I’m scratching my head over a real-world scenario and can’t seem to find any help in documentation, blogs etc. I’ve got a complex Tutor entity with related entity sets for Addresses,...