asynchronous

How can i programmatically generate an async request (calling a click event on a registered async control from a non-registered async control)?

On my Application, i've created a "ModalPopupUpdateProgress" schema: My form is composed of several buttons, and only two of them are under the UpdatePanel control. That's because i can't have all of the buttons triggering the UpdateProgress (at least on all situations). Let's focus on the btnSalvar control. <asp:Panel runat="server" ...

How to unit test asynchronous APIs?

Hi all. I have installed Google Toolbox for Mac (http://code.google.com/p/google-toolbox-for-mac/) into Xcode and followed the instructions to set up unit testing found here (http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting). It all works great, and I can test my synchronous methods on all my objects absolutely fin...

Asynchronous Servlets vs. synchronous Servlets

Since Servlet 3.0 asynchronous processing is supported. Would it be better, to use always asynchronous processing? Or in what cases is synchronous processing better? ...

WCF - AsyncPattern=true or IsOneWay=true

Hello there, Few methods in my WCF service are quite time taking - Generating Reports and Sending E-mails. According to current requirement, it is required so that Client application just submits the request and then do not wait for the whole process to complete. It will allow user to continue doing other operations in client applica...

how can I make asynchronous callbacks be processed in a different threadpool?

When doing a begin... async call, the delegate I pass is handled (according to the documentation) in the default threadpool. for instance: System.IO.Stream.BeginRead( byte[] buffer, int offset, int count, AsyncCallback callback, object state); How can I make it so that I can use a dedicated threadpool for async method handling? ...

Async HttpWebRequest with no wait from within a web application

In my web application (ASP.NET) I have a block of code that uses HttpWebRequest to make a call to a REST service and continue execution. Right now it's taking longer than I would like to complete the full web request. The thing is that what the REST service returns isn't useful. Ideally I would like to send an Async web request to the RE...

java: wrapping an asynchronous computation into a synchronous (blocking) computation

similar questions: Pattern for wrapping an Asynchronous JavaScript function to make it synchronous Wrapping an asynchronous method synchronously in C# I have an object with a method I would like to expose to library clients (especially scripting clients) as something like: interface MyNiceInterface { public Baz doSomethingAndBlo...

How do I make an async call to Hive in Java?

I would like to execute a Hive query on the server in an asynchronous manner. The Hive query will likely take a long time to complete, so I would prefer not to block on the call. I am currently using Thirft to make a blocking call (blocks on client.execute()), but I have not seen an example of how to make a non-blocking call. Here is the...

How do I model a 15-minute time-out with limited cron access (on Heroku)?

My team is currently using Authlogic for user authentication, which disables a user's account after 6 failed_login_attempts. I want to re-enable such a user's account after a 15-minute time period. The problem is that we are deploying to the Rails cloud host, Heroku, which offers only a one-hour cron job and a daily cron job. I seem to n...

Affect of Using & RemoveHandler in conjunction with an Async ASMX call

Given the following code Public Shared Sub DoAsyncAction() Using asmxProxy As New MyAsmxServiceProxy() AddHandler asmxProxy.WebFunctionCompleted, AddressOf WebFunctionAsync_Completed // Make the Async ASMX Webservice Call asmxProxy.WebFunctionAsync() // RemoveHandler asmxProx...

ajax synchronous call with timeout

New to ajax, so asking a very basic question. -- Is there no way to make a Synchronous ajax call (async:false) with timeout set on it.? http://www.ajaxtoolbox.com/request/ Timeout works perfect with Asynchronous call though in my application, but for one particular scenario, I need a Synchronous call (the javascript should actually wa...

How to add a timeout to a function in Python

Many attempts have been made in the past to add timeout functionality in Python such that when a specified time limit expired, waiting code could move on. Unfortunately, previous recipes either allowed the running function to continue running and consuming resources or else killed the function using a platform-specific method of thread t...

Asynchronous sql queries using ADO

Is there a way to place a sql query and call a callback function in C++ when the results are ready? I know there is a way to do this in ado.net, but this is a native environment, so I can't use .net. ...

Asynchronous winsock server wrapper, CPU lagging - C++.

Hello! I am trying to write a Server application wrapper, as I would with any application and I've searched for over a week for a at least decent guide or tutorial on asynchronous sockets( this wrapper has to be asynchronous ) and so far what i could do is this: #ifndef _SERVER_H #define _SERVER_H #include "asynserv.h" // header file w...

Rewriting foreach using IObservable and Reactive Framework

I'm in VS2008 with Entity Framework. I'm accessing objects from the database using esql for WHERE IN functionality. I'm passing a ton of IDs to the select statement so I chunk it up into sets of 800. Then I merge the results together from each chunk. My goal is to obtain results for each chunk in parallel, rather than waiting synchrono...

.NET LINQ-to-SQL asynchronous commit

Hey, i am considering - in order the get a high performance application - to keep a single DataContext in the cache to perform the selects and updates to... In order the keep the responsetimes low, i'd like to create an asynchronous update like the one i scribbled below: public void AsyncInsert() { DataContext dc = new DataContext()...

Pattern for Reusable asynchronous HttpHandler

I'm currently developing a custom HttpHandler (for compressing/combining CSS, but that doesn't matter for this question). I started with a simple reusable=true synchronous HttpHandler like we all know. Now i'm trying to improve it to an asynchronous handler (as it uses IO functionality and it's used on a very busy website). My first a...

Best way to add a 'callback' after a series of asynchronous XHR calls

Hey folks I stumbled on a piece of Ajax code that is not 100% safe since it's mixing asynchronous/synchronous type of code... so basically in the code below I have a jQuery.each in which it grabs information on the elements and launch an Ajax get request for each: $(search).each(function() { $.ajax({ url: 'save.x3?id='+$(this).attr(...

Java: is there a SwingUtilities.invokeNowOrLaterIfEDT(...) or similar?

(be sure to read the edit below, this question is obviously confusing I'm sorry about that) Here's a typical SwingUtilities.invokeLater call: SwingUtilities.invokeLater( new Runnable() { public void run() { ... } } ); Now I'd like to have what would be a SwingUtilities.invokeNowOrLaterIfEDT. Of course I could use ...

How do I deal with asynchronous spaghetti code?

Hello! I am writing a simple application using the Facebook iPhone SDK. The Facebook code is mostly asynchronous, I start an operation and receive the response asynchronously in a delegate call: - (void) doSomething { [FBSomething startOperationWithDelegate:self]; } - (void) fbOperationFinished: (FBSomething*) operation {…} Quite...