Consider the following code:
class Foo {
// boring parts omitted
private TcpClient socket;
public void Connect(){
socket.BeginConnect(Host, Port, new AsyncCallback(cbConnect), quux);
}
private void cbConnect(IAsyncResult result){
// blah
}
}
If socket throws an exception after BeginConnec...
I am using a function supplied by a third party library. This function takes a callback function as a parameter, but I would like to wait for this callback to be called before continuing. Is there a standard / accepted way to do this?
...
I am trying to prototype a Rpc Call to a JBOSS webserver from Silverlight (4). I have written the code and it is working in a console application - so I know that Jboss is responding to the web request. Porting it to silverlight 4, is causing issues:
let uri = new Uri(queryUrl)
// this is the line that hangs
let request : HttpWebRequ...
Hey all,
I'm creating a javascript widget so third partys (web designers) can post a link on their website and it will render the widget on their site. Currently, I'm doing this with just a script link tag:
<div class="some_random_div_in_html_body">
<script type='text/javascript' src='http://remotehost.com/link/to/widget.js'><...
Hi
Does any one have an example for ReceiveFromAsync works with regard to UDP? i couldn't find any sample code. I can find a few TCP sample but msdn say 'The ReceiveFromAsync method is used primarily to receive data on a connectionless socket'.
Thanks,
Nick
...
I am developing a data-flow oriented domain-specific language. To simplify, let's just look at Operations. Operations have a number of named parameters and can be asked to compute their result using their current state.
To decide when an Operation should produce a result, it gets a Decision that is sensitive to which parameter got a val...
I have a table A which maintains count of total users in Table B. All I care is that the count in Table A is in sync with the number of users in the table B.
So, whenever I insert a user in Table B, I want the count to be incremented/decremented depending on insert of user or delete.
There are two ways:-
a) In case I am inserting the...
how can i use Asynchronous queries in sqlserver 2005 & asp (not .net)
...
I'm having a problem with NamedPipeServerStream - when my code reads data it's just repeating the output of the last Read without grabbing the new data.
Here's the smallest server code example that exhibits this behaviour:
using System;
using System.IO;
using System.IO.Pipes;
using System.Text;
namespace ConsoleApplication1
{
clas...
I'm using Eventlet's example code found here: http://eventlet.net/doc/examples.html#producer-consumer-recursive-web-crawler
Halfway through the run, I encounter multiple instances of the following:
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/eventlet-0.9.9-py2.6.egg/eventlet/hubs/hub.py", line 285,...
In .NET when you make an async call I understand that this call is resolved in a seperate thread thus not blocking the original thread where the call was made.
How does the mechanics behind this work. Is a new thread spawned on every async call or is there a shared async thread that handles these operations? If it is a shared thread, d...
Can anybody explain me what is the difference between the Begin[...]/End[...] asynchronous API pattern and the later [...]Async pattern in .NET 3.5?
Why was the later created?
Why would one prefer one pattern over another?
For example, Socket.BeginAccept() and Socket.AcceptAsync().
...
As I mentioned, because Silverlight HttpWebRequest.Create hangs inside async block, I just created a bundle of callback functions to implement the same async block.
The login process requires two steps :
1) Get request to a page that returns a cookie
2) Form Post to a second page that passes that cookie w/ it and performs the authen...
Hi folks,
Maybe because the child processes are not aware of my hash (see the below code), the hash %output is not collecting anything .. is there any other way to collect the value apart from writing a tmp file ?
foreach $Item (@AllItems) {
$pid = $pm->start($Item) and next;
$Temp = qx($Item);
$output{$Item}= $Temp; // This doesn't co...
The only way that I know of to make an async call using Linq to SQL is to compose an IQueryable and then ask the data context for the equivalent SqlCommand using GetCommand, which provides the BeginExecuteReader method. This approach didn't work for stored procedures and required some hackery to essentially use reflection to generate the...
I'm using the synchronous implementation of JRedis, but I'm planning to switch to the asynchronous way to communicate with the redis server.
But before that I would like to ask the community whether the JRedisFuture implementation of alphazero's jredis is stable enough for production use or not?
Is there anybody out there who is using ...
Hi,
I am using new async code of Google Analytics, would it be correct to call GA.js twice in the same page, if not, is there a way to do that ?
My problem is I need to account two PageViews on a booking form using flash, the trouble is that user may not necessarilly get to the second stage but close the window n the first stage.
...
I'm migrating a project to the MVC 2.0 RTM version, and have hit a snag.
I have a couple of asynchronous controllers based upon the older MVCfutures (1.0.0.0)
This previous release let me do very clean asynchronous methods (see below for example)
EDIT: Work around was to retain the previous futures version. Need a solution moving forw...
hey guys,
I have a photo gallery page hosted on a CMS (Squarespace) which has some of it's own scripts which load the thumbnails asynchronously.
The actual large images however are not preloaded, so I decided to add my own script into the mix to just make the browser load those larger images into the cache in the background, like this:...
Hi
I have a report that takes about 2 or 3 minutes to pull all the data
So I am trying to use ASP.net Asynch pages to prevent a timeout. But can't get it to work
Here's what I am doing :
private delegate List<PublishedPagesDataItem> AsyncReportDataDelegate();
private AsyncReportDataDelegate longRunningMethod;
private List<Published...