asynchronous

How to block until an asynchronous job finishes

I'm working on a C# library which offloads certain work tasks to the GPU using NVIDIA's CUDA. An example of this is adding two arrays together using extension methods: float[] a = new float[]{ ... } float[] b = new float[]{ ... } float[] c = a.Add(b); The work in this code is done on the GPU. However, I would like it to be done asynch...

ASP.NET 2.0 Asynchronous User Control Not Working

I'm trying to get a user control working asynchronously, yet no matter what I do it continues to work synchronously. I've stripped it down to its bare minimum as a test web application. This would be the user control: <%@ Control Language="C#" %> <script runat="server"> SqlConnection m_oConnection; SqlCommand m_oCommand; ...

Long lived JMS sessions. Is Keeping JMS connections / JMS sessions allways open a bad pratice?

Is keeping JMS connections / sessions / consumer always open a bad practice? Code draft example: // app startup code ConnectionFactory cf = (ConnectionFactory)jndiContext.lookup(CF_JNDI_NAME); Connection connection = cf.createConnection(user,pass); Session session = connection.createSession(true,Session.TRANSACTIONAL); MessageConsumer...

Start Bit vs Start Byte

I know in a lot of asynchronous communication, the packet begins starts with a start bit. But a start bit is just a 1 or 0. How do you differentiate a start bit from the end bit from the last packet? Ex. If I choose my start bit to be 0 and my end bit to be 1. and I receive 0 (data stream A) 1 0 (data stream B) 1, what's there to stop...

Does ASP.NET MVC Framework support asynchronous page execution?

I'm learning ASP.NET MVC Framework, From some articles like this, it seems that MvcHandler has only Execute() implemented, there is no asynchronous API implemented. Actually, I don't think Controller has asynchronous API either. So, ASP.NET MVC doesn't support asynchronous programming? this could be a big hurdle to scalability if the we...

How to Make ASP.NET MVC Recognize IHttpAsyncHandler from IRouteHandler.GetHttpHandler() ?

In this question & answer, I found one way to make ASP.NET MVC support asynchronous processing. However, I cannot make it work. Basically, the idea is to create a new implementation of IRouteHandler which has only one method GetHttpHandler. The GetHttpHandler method should return a IHttpAsyncHandler implementation instead of just IHttpH...

"Best Practice"/Favourite Pattern for Calling Web Services (ASP.NET)

Problem: We have a web app that calls some web services asynchronously (from the page). Normally this is fine, but some are failing under load test (due to timeouts). What are (if there are any) any suggested "best practices" for calling web services asynchronously in a web application? Are there any patterns that may be of use? Sh...

Why are event-based network applications inherently faster than threaded ones?

We've all read the benchmarks and know the facts - event-based asynchronous network servers are faster than their threaded counterparts. Think lighttpd or Zeus vs. Apache or IIS. Why is that? ...

Implement C# Generic Timeout

I am looking for good ideas for implementing a generic way to have a single line (or anonymous delegate) of code execute with a timeout. TemperamentalClass tc = new TemperamentalClass(); tc.DoSomething(); // normally runs in 30 sec. Want to error at 1 min I'm looking for a solution that can elegantly be implemented in many places wh...

how to synchronize webservice calls in javascript

I have a control application - using asp.net webservices. I have a timer which does an asynchronous webservice call every 5 seconds to update the screen.There are also user buttons to refresh parts of the screen, also doing async webservice calls. The issue is my screen get messy if a user webservice command is issued before the timer ...

Can I make Asynchronous ODBC Calls? Any reference materials?

Does ODBC support asynchronous calls? If it does, then can you tell me about any reference materials? My preferred language is C++. ...

What is the best way to provide "search as you type"?

I'm porting a Forms app to a VB.NET web app, and one of the feature the users really liked was the ability to narrow the possible choices as the user typed in a search box. The search itself goes against multiple tables and columns (and takes several seconds), so it's not a simple AutoComplete or anything. What's the best way to allow th...

Asynchronous file writing possible in python?

Is there an existing module or an easy way to use aio_write to write to a file asynchronously in python? I know by file io that comes with Python is all blocking which is fine in most cases, but for this particular case I need writes not to block the application at all, or at least as minimally as possible. ...

To Ajaxify Or Not?

I really love the way Ajax makes a web app perform more like a desktop app, but I'm worried about the hits on a high volume site. I'm developing a database app right now that's intranet based, that no more then 2-4 people are going to be accessing at one time. I'm Ajaxing the hell out of it, but it got me to wondering, how much Ajax is...

Serializing objects for asynchronous messaging

I'm considering using AMQP (using qpid) to enable a mixture of Python and Java services communicate with each other. Basic text messaging seems simple enough but, as with every other messaging technology I've investigated, that's where it seems to stop. Except for building instant messaging applications, I would have thought sending stri...

Silverlight Async Timeout Error

Calling through to my Silverlight Enabled WCF-Service in my silverlight application, occasionally users get timeouts. Whats the easiest way to boost the time allowed by the service client for a response? The exact exception thrown is: System.TimeoutException: [HttpRequestTimedOutWithoutDetail] Thanks ...

How do I populate a ListView in virtual mode asynchronously?

I'd like to display records from our database in a listview - but retrieves can take a long time. I can use RetrieveVirtualItem to tell me when a new ListViewItem is needed, add a dummy item, and start a retrieve; but what do I do with the record when the database returns it? I can't update the ListView's Items collection while the Lis...

Would ManualResetEvent/AutoResetEvent use workerthread or IO-thread in asp.net

the web layer is coded in asp.net with pages marked as async. Yes, the recommended way to code for aync is using the RegisterAsyncTask I have a problem now - there are a few pages that have used AutoResetEvent and ManualResetEvent for aync and not the standard RegisterAsyncTask. Would these objects servicing the async calls, use up th...

How to use ReadDirectoryChangesW() method with completion routine?

I want to use function ReadDirectoryChangesW() in asynchronous mode with I/O completion routine supplied. The question is I don't know how to retrieve the exact information about the change in the completion routine (a CALLBACK function). Completion routine is defined like this: VOID CALLBACK FileIOCompletionRoutine( [in] ...

Simple Asynchronous Multi-Threaded HTTP request library for C++

I'll be quick and honest: I'm currently trying to write a client/server for an online game. Since I'm poor and limited on resources, I'll be testing the bare basics of the server using a PHP backend, with the eventual goal being to rebuild the server end in C++. I'm looking for a C++ library for Windows (XP and Vista preferably) that wi...