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
0answers
39 views

Simplifying asynchronous “executeAsync” method along with “onFailure” callback

I have a system in which user id is "sharded" across all the machines which means each machine is responsible for certain user id data. I am working on a library which will take ...
2
votes
1answer
16 views

Logging of various exceptions in the callback

I am working on a library in which I need to execute my URL using AsyncRestTemplate and after that I will get a json response back if it is successful. I am also making ...
1
vote
0answers
25 views

Asynchronous execution

I needed several classes with methods performing network requests which should be executed asynchronously (with callbacks). To get rid of repetition, I added a mixin and a helper class: ...
2
votes
1answer
44 views

Cancellable progress form using async/await

Introduction: For a project I'm working on I used a BackGroundWorker to lift some heavy tasks away from the UI thread and report progress. For this I created some ...
2
votes
0answers
20 views

React Flux structure for a shopping app

we have just started up a new app and we are using React with the Flux architecture, we have done our best to piece together what we think is the best structure for the app and would appreciate any ...
7
votes
2answers
118 views

Having sync and async methods by implementing future interface

I need to make a library in which I will have synchronous and asynchronous methods in it and this library will be used by our customer in our company. Some customer will call the ...
3
votes
1answer
67 views

Efficiently having a sync and async method by implementing future class

I need to make a library in which I will have synchronous and asynchronous methods in it. And then if there are any exception like TimeoutException or any other ...
2
votes
1answer
36 views

Async F# with Entity Framework

I have been playing with Async/parallel excution in entity framework for while and like to share with you my code, I'm not sure if I'm doing it right. Thanks for any comments. I have two entity ...
3
votes
1answer
107 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
126 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
61 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
26 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
42 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
108 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
34 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
74 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
53 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
59 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
193 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
109 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
110 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
63 views

Asynchronous Angular Promise and Variable Initialization

I have a factory that looks like such: ...
6
votes
1answer
101 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
80 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
65 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
131 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
57 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
139 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
197 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, ...
3
votes
1answer
239 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
185 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
123 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
70 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
812 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
174 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
92 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
28 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
246 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
255 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
278 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
82 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
367 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
189 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
70 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
56 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
385 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
251 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
253 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
172 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. ...