asynchronous

Do async Post + callbacks really prevent queuing?

I've recently tried to implement an asynchronous callback model, so that when developers consume my library, they don't need to worry about the following: if(control.InvokeRequried) { // invoke } That part of the code seems to be working quite nicely, but I discovered something a bit strange today, that I think I've diagnosed but wou...

Why are my message be processed out of order over a single WCF TCP channel (with ConcurrencyMode.Reentrant)?

The client sends a lot of messages to the server from a single thread, over a single WCF channel. The client sends the message with BeginMyMethod(x, b) as it does not wish to block while they get processed. We have reliable messaging turned on, as we don’t wish to lose any messages, or have them get out of order. However the messag...

Problem realizing FTP-client with asynchronous socket in C#

(excuse me for my bad english)) I am writing a class for simple requests to FTP-server using .NET-class System.Net.Sockets.Socket.Synchronous functions (Socket.Connect, Socket.Send, Socket.Receive) works fine. But I need asynchronous operation to be able to interrupt the process from the outside. I used an example from MSDN: http://ms...

Do you think F#'s async workflows will be introduced in C# in the future?

First of all, I apologize because of my foolish question, I really don't know much about F#. But I know that it makes thread handling significantly easier. However, seeing the language construct someone might wonder why C# should miss the coolness that is asynchronous workflows? What theoretical limitation does C# have that prevents the ...

Please Help to make asynchronous socket server and client working ( written in C)

Hi, Could some please help me with these codes? I am trying to make client and server to communicate asynchronously. I mean both client and server don't wait for each other (e.g. when a server or client reads from recvfrom() and data are not present, it takes the last received one (what I named is backup). Here are the codes: client ...

Does EWOULDBLOCK work for sendto()?

Hi , Could someone please tell us if EWOULDBLOCK. works sendto()? If yes! please give an example ... thanks! If not, is there anything similar to accept error? Thanks for your replies ...

What library implements asynchronous processing of messages?

Help find a library that implements: 1) Publisher-Subscribers. Publisher sends (SendMessage - not WinAPI function) the message, not knowing how many subscribers will receive it, maybe 0. 2) Asynchronously. If there is a free flow, the subscriber (s) must start in parallel with the code after the SendMessage. 3) Smart pointers to param...

how many async socket requests can be going on on the same socket?

When I call BeginSend on a socket, I pass a delegate which will be called (by a different thread) when the data has been sent. What would happen if I call BeginSend another time while the first has not yet been 'callbacked'? What is the correct behavior to send data? do BeginSend, and on the callback do EndSend and start another send? ...

Interrupt method execution after arbitrary time in Python

I have some method doA() that occasionally hangs for a while. Are there any common modules in Python that can control time of doA() execution and interrupt it? Of course, it may be implemented via threads, so simple wrapper around threading module may be good solution. In other words i'd like to have code like: import CoolAsyncControl ...

Stopping Application Loop in secondary AppDomain

First off, apologies for the length... I have a Host/Plugin application akin to MAF. We are not using any of the System.Addin or associated namespaces as this is a custom plugin architecture with multiple AppDomains in play. The Host UI (user interface) is running in it's own application loop (AppDomain). When an item in a listview is...

long polling netty nio framework java

Hi, How can I do long-polling using netty framework? Say for example I fetch http://localhost/waitforx but waitforx is asynchronous because it has to wait for an event? Say for example it fetches something from a blocking queue(can only fetch when data in queue). When getting item from queue I would like to sent data back to client. Ho...

Asynchronous programming using Java

Where can I find asynchronous programming example using Java? I'm interested in finding patterns in asynchronous programming for building applications that present responsiveness (preventing applications that periodically hang and stop responding to user input and server applications that do not respond to client requests in a timely fas...

.NET: Mechanism for sync-ing long-running tasks

Problem description: you write a library which contains some algorithms/tasks which can take a long time to finish, for various reasons: computational, file system, network communication etc. You want to be able to: Send some progress information about the task (progress, activity logging etc.) Have a way to abort the task before comp...

C#, Asynchronous sockets Server/Client, StackOverflowException.

Hello. I'm writing an asynchronous server and client with C#. I took sample code from MSDN, modified and made it to send and receive messages several times. I tried to connect 5 and more clients to server and it worked but on 98th iteration each client throws an exception StackOverflow. Can anybody explain me why I get this error? I've r...

Make an operation asynchronous

I have a third party ActiveX that represents a video camera. (AcxCamera myCam;) I connect this camera to a videostream via the Connect method. (myCam.Connect(url);) It's to note that AcxCamera is an object inherited from the third party Acx, so I can "control" the Connect method. Now, I have some cameras that should be started synchro...

Asynchronous web upload

Can anyone recommend a free module that will let me create web forms that allow asynchronous file uploads? I want to be able to upload files on a website without doing a full page reload. The module must work with a LAMP web site. The module can be built in AJAX or Flash. Or is it better for me to create this module myself? ...

Javascript synchronous AJAX timeout

My Javascript needs to send some data to a server when the page closes, which I currently do with a synchronous AJAX (SJAX?) request in window.onbeforeunload. The problem with this, of course, is that if my server takes too long or the network connection dies, the browser freezes. From what I've read, it's not possible to specify a time...

Executing only the last function called

Hello! This is the setup in short. I have a big table. Everytime a cell get focus an asyncron call to the server is done (with PageMethods) and some data is returned and updates a infobox in the page. I have written code that makes it possible to navigate between cells with the arrow keyes. The problem occurs when I shift focus fast t...

[Ajax] Call interrupted by page load

Hi there! I am a beginner using ajax and I always thought that it is completely asynchronous. But I discovered that a call can be interrupted by a page reload or a page change (like clicking on a hyperlink). I was under the impression that when an ajax call is started, it is carried out no matter what the browser does afterwards. Is tha...

Python: Asynchronous http requests sent in order with automatic handling of cookies?

Hello, I am coding a python (2.6) interface to a web service. I need to communicate via http so that : Cookies are handled automatically, The requests are asynchronous, The order in which the requests are sent is respected (the order in which the responses to these requests are received does not matter). I have tried what could be e...