asynchronous

How to solve these problems with Asynchronous Callback>

I need to run 5 algorithms parallely each takes an image as input and gives image as output. After each of these is done, I need to display the 5 output images. I'm using Asynchronous Callback using delegates for this task. So, I created 5 delegates for these 5 algos and calling them like algo1Delegate.BeginInvoke(). Algorithms are run...

How to asynchronously call a method in Java

Hi, I've been looking at Go's goroutines lately and thought it would be nice to have something similar in Java. As far as I've searched the common way to parallelize a method call is to do something like: final String x = "somethingelse"; new Thread(new Runnable() { public void run() { x.matches("something"); ...

powershell - launching local apps fast

I am building a kiosk type config script on low-spec hardware. At the end of the script, it runs the various apps for the user to interact with. I currently use a plain Invoke-Command "path\to\app.exe". I want to get the interface up and running as quickly as possible. I want to launch the apps asynchronous. I know there there is star...

Bring data came from async operation to main thread.

This is a "problem" i have with data that i receive from a library that has some Async operations on sending and receiving data. While i receive data and get data in my Mobile Windows Form or Desktop i need to deal with the cross thread operation. I deal with this while checking InvokeRequired and do Action if true...etc...But, what i re...

How to call a webmethod asynchronously and partially render a control ?

Hi all, I need to call a webmethod of a webservice asynchronously from code behind of a web page. In the callback function I need to bind a gridview and render it. I want to partially render that gridview in the callback function in codebehind. How to implement that? Is it possible to implement all these in codebehind without using ...

Any design pattern that will be helpful in implementing asynchronous communication using sockets?

Here is a brief description of what I want to accomplish. I am developing a peer to peer application using sockets. I want all my communication to be asynchronous. When ever a peer will ask another peer for something, it will send him the request tagged with a unique id. He will also store this information that what should he do with he...

Asynchronous operations on WriteableBitmap

I'm writing an application in WPF (C#) which does long operations on a collection of Bitmaps. To keep my application responsive, I decided to use another thread to perform the operations on bitmaps and report progress on a progressbar in main UI thread. I thought BackgroundWorker would do anything for me, but looks like it won't be that ...

How to force Sequential Javascript Execution?

Ive searched a lot of places for the answer to this seemingly simple problem, but Ive only found rather complicated answers involving classes, event handlers and callbacks (which seem to me to be a somewhat sledgehammer approach). I think callbacks may be useful but I cant seem to apply these in the simplest context. See this example: <...

Same Machine Erlang communication

I need an answer to the following question to help understand what approach I should be taking to interface with Erlang. AFAIK Erlang on a SMP UNIX box uses the multi-process approach. In this case it should do same machine IPC. Does Erlang use UNIX domain sockets for UNIX ? Does it use named-pipes for windows ? If it does not implem...

Returning data from asynchronous socket requests correctly?

Hi all, This is my first foray into asynchronous socket development, so I'm open to any and all suggestions - thought I do have a specific q. My objective is to make a series of httpRequests using raw async sockets, I need to grab the http response headers that the server replies with. I adapted the code from this MSDN article: http://...

Too fast response

I have an ASP.NET-MVC application that: opens a db transaction updates a cart status and other things submits this cart to another web server via an HttpRequest register in database the transmission with its code status send a confirmation mail, that the command has been sent then if no error has occurs commit the transaction else roll...

f# Task Parallel Library vs Async Workflows

I have some stuff written in c# that executes concurrent code, making heavy use of the Task Parallel Library (Task and Future continuation chains). I'm now porting this to F# and am trying to figure out the pros and cons of using F# Async workflows vs. the constructs in the TPL. I'm leaning towards TPL, but I think it could be done e...

Using Delegates in C# Asynchronously

I have the following delegate delegate void UpdateFileDelegate(long maxFileID); That I am calling from a WinForms app like so UpdateFileDelegate FD = new UpdateFileDelegate(ClassInstance.UpdateFile); FD.BeginInvoke(longIDNumber,null,null); It runs asynchronously but the question I have is how can I tell when the Method is done exec...

iPhone SDK - Async Behavior?

I have a IBAction that looks like this: self.title = @"Logging in ..."; [MyClass myLongRunningOperation]; My Problem is that the view controller title does not get updated until the long running operation has finished. It seems like its put in a queue for later, while my long running operation executes right away. I'm pretty new to t...

Asynchronously Decoupled Three-Tier Architecture

Maybe I just expected "three-tier architecture" to deliver a little more than just a clean separation of responsibilities in the source code (see here)... My expectations to such a beast that can safely call its self "three-tier architecture" are a lot higher... so, here they are: If you were to build something like a "three tier arc...

Is my asynchronous I/O callback function recursive?

I'm writing an asynchronous read callback function and as I'm learning C# at the moment would like to ask if the following is recursive (It's not mine but mine will be similar is construct): protected void ReadCompleted(IAsyncResult iResult) { byte[] byIn = (byte[])iResult.AsyncState; try { F...

Implementing an async WCF service

I have a WPF application which I'm currently working on separating into a client and server side - using WCF. I did not like the mess I initially got with the straight forward solution, so now I'm restructuring following the recommendations in the screencast of Miguel Castro, WCF Extreme. If you're not familiar with the video he basicall...

Asynchronous web service call returning null (called from ASP.NET asynchronous page)

I am consuming a 3rd-party web service which has been implemented in WCF. My consumer code resides on an ASP.NET asynchronous page. Problem is, sometimes the BeginCallWebService() method is returning null. Shouldn't it always return an IAsyncResult object? Should I ask the web service developer to modify their code, or is null a legit...

Executing server-side Unix scripts asynchronously

We have a collection of Unix scripts (and/or Python modules) that each perform a long running task. I would like to provide a web interface for them that does the following: Asks for relevant data to pass into scripts. Allows for starting/stopping/killing them. Allows for monitoring the progress and/or other information provided by the...

Does anyone know of a asynchronous mysql lib for python?

I've been looking into non-blocking servers for python (tornado, twisted etc) but a lot of the benefits seems to be lost if there's no non-blocking connection to the database. Does anyone know if there are any projects that take care of this? (by non-blocking a la node.js) Edit: Clarified my question ...