Asynchronous programming is simply allowing some portions of code to be executed on separate threads. It makes your applications perform better, be more responsive, and use the resources of the system they are running on to the fullest extent.

learn more… | top users | synonyms (1)

3
votes
1answer
49 views

Async distributed locking with StackExchange.Redis

I have been trying to write an analogy to this approach to distributed locking with two differences: making it asynchronous making it work with StackExchange.Redis rather than AppFabric Cache. My ...
7
votes
3answers
121 views

Notifying the UI that Issues Were Found

Our Rubberduck VBA IDE Add In does some static code analysis, and then reports all of the found issues back in a gridview. This analysis can take a long time for larger projects and the UI appeared to ...
4
votes
2answers
49 views

High udpclient CPU use

I have a bunch of different ports I want to listen on and the iterate over the available data to send to a Dataflow pipeline. In total I'm listening on 14 ports. I'm looking for any advice on how to ...
1
vote
0answers
18 views

JavaScript nesting XMLHttp requests and in a loop

I am new to JavaScript, especially the wonders of async and closures and would like some help on the attached code. It is in a Chrome extension and retrieves a list of users albums with the Picasa Web ...
3
votes
0answers
30 views

Java 8 CompletableFuture - fan out implementation

I was wondering what is the best way to implement a fan out type of functionality with Java 8 Completable future. I recently rewrote a function that had a bunch of old ...
3
votes
2answers
96 views

Log-reading & String-matching with hashtable for fastest execution speed

I'm currently enjoying this exercise I'm working on for fun: I wish to write optimized code for the searching of particular strings per line in a (very large) file, counting how many exist, and ...
2
votes
1answer
29 views

Asynchronous login form handler

I have an app that user submit the log in form , when it sent the data to server app create a connection for its account. In this connection i have an integer field named as state. the state value is ...
1
vote
1answer
63 views

Asynchronous method and collection binding

I have a WPF application, in which I'd like to bind a collection to a combobox using an asynchronous method : ...
2
votes
1answer
50 views

Conditional callback for asynchronous file copy

I'm trying to figure out the most elegant solution to do the following asynchronously using JavaScript (specifically node): Given a destination file name, check if it is a directory If it is a ...
0
votes
1answer
55 views

Queue like system to check existence of email

I have a table in my database containing email and email_state amongst other values. Email is the email of the contact, and ...
0
votes
0answers
137 views

Android app with an ActionBar, a ViewPager and an AsyncTask

I'm new at Android and Java development and I've put together a demo app to start learning, which is made of: a main activity extending ActionBarActivity, in ...
2
votes
1answer
64 views

Async Controller Play 2.3

Is this example the correct way of writing an Async controller end point in Scala using Play 2.3? ...
3
votes
1answer
87 views

Golang async but sequential enqueue with buffered channel

The objective of this program is to call enqueue sequentially with multiple URLs, and never block, fetching the URLs asynchronously, but on the order they were entered. In other words: keep calling ...
1
vote
1answer
37 views

Asynchronous Angular Promise and Variable Initialization

I have a factory that looks like such: ...
6
votes
1answer
84 views

C++14 Async Task Scheduler

I'm not sure if this site has the right audience for anyone to be able to respond to this, but I wrote a header only scheduler which schedules a task to be run in the future on another thread: ...
4
votes
1answer
66 views

Class for easier to read IProgress<Class> handling

The recommended way to report something as "progress" back from a async function is to use IProgress<Type> or ...
3
votes
1answer
58 views

Execute startup method asynchronously

The goal is to call startManager on application start so that the manager is initialized in background without blocking application main thread. Is it a safe ...
3
votes
1answer
105 views

Wait for System.IO.StreamReader.ReadLineAsync

I want to wait for a line to be read, but only for so long before timing out. This is what I came up with. Is there a better way to do it? ...
0
votes
0answers
48 views

Approach to avoid callback hell without third party modules

I am using the following approach to avoid callback hell. I am curious about what you think since I haven't seen this approach before. What are the pros and cons? To me the advantages are: Easy to ...
1
vote
0answers
94 views

Server socket implementation with Python asyncio

I want a socket server implementation with the Python asyncio library. I have this code but I don't know if it's correct. I want to implement SSL, too. I used code from the documentation example and ...
6
votes
4answers
194 views

First time trying async

I've been trying to learn async coding recently. I've managed to get it to work and the UI thread doesn't block like it does if I don't make the code async. I realise this is a very contrived example, ...
2
votes
1answer
152 views

A ViewModel using ReactiveUI 6 that loads and sends data

Most of the Rx Compelling Examples™ load and store data locally which I don't find that Compelling. I spent some time coming up with how to best perform the following actions but want to make sure I ...
7
votes
1answer
175 views

Lock Using “Interlocked” vs lock Statement (“Monitor”) (Followup)

This is a followup to a previous question. Considering: Interlocked.CompareExchange generates a memory barrier, Intended to be used with very fast operations ...
4
votes
2answers
106 views

Lock Using “Interlocked” vs lock Statement (“Monitor”)

A followup question can be found here, based on this question and it's answer. Considering: Interlocked.CompareExchange generates a memory barrier, Intended to ...
3
votes
1answer
65 views

Event Subscriber with Parallelism

I am trying to exploit asynchronism for parallelism. This is my first attempt at a parallel event subscriber. In your expert opinions, is this a valid approach? ...
4
votes
2answers
810 views

Running Code Just Once

I want a code run just once (say in Dispose). WriteOnceBlock<T> from TPL Data Flow could be used here; but again if we ...
1
vote
1answer
151 views

TCP Server with multithreading

I am working on a banking application. I want to create a multithreaded TCP Payment Card (iso8583) server that can handle passbook printing requests simultaneously. Multiple devices are connected to ...
4
votes
1answer
78 views

Asynchronous API calls with delegates and event handlers

I'm making a WindowsPhone 8 app in C#. With this an API so I can convert JSON data into useful objects. I've found a method but am wondering if it is any good at all. The problem is it's been a while ...
0
votes
0answers
26 views

Using an asynchronous function without directly using its callback

I hate functions and re-writing callbacks by "intercepting" them and passing the original along. This is simple: it uses an existing function, exec, and doesn't ...
2
votes
1answer
155 views

Simplify double AJAX request for jQueryUI's autocomplete widget

I'm using jQueryUI's Autocomplete widget for a product search. The data is in a database, so as the souce I passed it an AJAX request. My problem is, that I need some data about the currently focused ...
4
votes
1answer
191 views

Asynchronously wait for a task to complete and do some async action while waiting

I have a long-running task. My goal is to create a method that will allow me to: Asynchronously wait for this task to complete While waiting on a task, do some async action once in a while. This ...
4
votes
1answer
204 views

AsyncTask which allows to handle exceptions on UI

The AsyncTask available in android, gives you the result from doInBackground on the UI thread so that you can update UI ...
6
votes
2answers
78 views

Buffering of fast changing datapoints or events

The following class implements a buffer which captures fast changing datapoints or frequently raised events and dispatches them in batches. It will asynchronously call a processing function for the ...
3
votes
3answers
305 views

Implementing a POC Async Web Crawler

I've created a small proof of concept web crawler to learn more about asynchrony in .NET. Currently when run it crawls stack overflow with a fixed number of current requests (workers). I was ...
8
votes
2answers
184 views

Concurrent Task Waiter 2

This is an iteration of my previous question: Concurrent Task Waiter Summary from before: I have some code designed to simplify managing multiple asynchronous operations. The code creates ...
1
vote
1answer
68 views

Concurrent Task Waiter

I have some code designed to simplify managing multiple asynchronous operations. The code creates callback actions that, when executed by the asynchronous operation, track which asynchronous methods ...
2
votes
1answer
54 views

Move uploaded file

As I mentioned in Node.JS fs.rename can not move files in right way. And it should be solved with stream piping. Please verify this code and answer questions in comments: ...
6
votes
1answer
347 views

Clojure core.async web crawler

I'm currently a beginner with clojure and I thought I'd try building a web crawler with core.async. What I have works, but I am looking for feedback on the following points: How can I avoid using ...
3
votes
1answer
206 views

Clock mux for allowing glitch-free muxing of asynchronous clocks

This clock mux is meant to allow glitch-free muxing between asynchronous clocks clk_a and clk_b via a (also asynchronous to both ...
4
votes
0answers
222 views

Asynchronous Array.map

I put together an asynchronous map function for Swift's Array using Grand Central Dispatch. It's called with a transform ...
3
votes
1answer
156 views

Solving the Shortest Path problem (little bit of TSP, too)

Some background info: I'm working at a shipping company and the company's web developer has been fired a week ago. My boss knew that I had some knowledge in web development, so until we get a new ...
6
votes
5answers
1k views

Calling many web services asynchronously

I need to process a bunch of completed orders (thousands). To make it faster, I'm using a SemaphoreSlim to schedule a number of orders to be processed in parallel. ...
4
votes
1answer
109 views

Shorten my asynchronous DB queries, using async.js module

I am using Node.js Express.js node-mysql.js async.js I am making multiple asynchronous queries to my DB, but every query relies on the previous one's results, so I decided to use the ...
4
votes
2answers
95 views

Fetch details from server

I am using this code to fetch some details from server from my android app. How can I improve it? Here I am also transferring some data from one activity to another. This is how I have written my ...
3
votes
0answers
87 views

Validating asynchronous behavior

I have a large service application I designed; it's a solution made up of about 30 projects. I was wondering if anyone could point me in the right direction regarding using the Task-based ...
3
votes
2answers
274 views

Read multiple files async

I want to read multiple files simultaneously and apply the same function on data. This code works correctly, but can someone please suggest any better way of writing this? ...
6
votes
1answer
85 views

Blocking and async UDP communication with an IR camera

I'm writing a Java application to control a custom IR research camera that will be installed on an aircraft. The camera connects to the the computer using UDP sockets via a direct LAN cable. The ...
10
votes
1answer
2k views

Simple Async Google Maps initializer with AngularJS

Here is a simple reusable AngularJS factory I came up with to initialize Google Maps Asynchronously, which somehow does not seem ...
2
votes
1answer
87 views

Is it a good idea to have a public inner class as a runner for a service?

I have a service class that handles recipe management using a piquetteClient (piquette is a web app with a rest API that can run puppet scripts). The thing is ...
5
votes
1answer
233 views

Is this SqlConnection / SqlCommand async wrapper both efficient and correct?

This is my first time writing async code, I intend to inject the interface IConnection into other classes in my project. Can you please tell me if the implementation class Connection, is the correct ...