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)

0
votes
0answers
13 views

Python 3 asyncio - Simple client/server communication [on hold]

What am I implementing wrong on the client or server? The communication is not going on properly. Here are the order things run as of right now: Start the server Start the client Client executes up ...
3
votes
0answers
20 views

Q.js worker pool

I'm building a program to scrape data about hockey games in order to compile statistics. One of the run modes will process all of the games in a single season (1230). Processing a single game consists ...
-3
votes
0answers
21 views

Javascript - Handling race condition on async function call [closed]

This weekend, I ran into a peculiar problem of handling race conditions in Javascript. Here is the code that was giving me problem: ...
2
votes
1answer
46 views

C# Async and DataContext access

I'm using a DataContext to insert an object. Currently it's working, but I'm feeling things could be done better. Method is called from UI (Using Caliburn Micro Binding). IsBusy is a property used by ...
4
votes
1answer
60 views

Throttle actions by number per period

I want to throttle asynchronous actions at a specific maximum rate of n actions per t period, and have pending actions wait until there is a free slot (rather than drop them). I want to receive the ...
1
vote
1answer
56 views

Android Movie Class With AsyncTask

I've got a class called Movie and within this class I use an AsyncTask to get a Bitmap from ...
5
votes
1answer
231 views

Calling other machines from the LinkedList if one is blocked or down

This is a follow on to : Simplifying asynchronous "executeAsync" method along with "onFailure" callback. I am using AsyncRestTemplate as my ...
-1
votes
1answer
96 views

Using async & await

I've been experimenting with some old code that needs refactoring in places and was testing if there was any improvement to iis threads etc by uploading file asynchronously (Server Side). I'm using ...
0
votes
0answers
34 views

Implementing Ajax deferred/promise patterns

I have a testcase where I want to send a request to the server every time a form field change event occurs. The implementation below works as expected until I ...
2
votes
2answers
65 views

Synchronous and asynchronous motor movement

I am working on an API that is mostly intended to be used interactively/little scripts. There are some classes with methods that could act slightly differently depending on the intention of the user, ...
6
votes
3answers
270 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
30 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
35 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
72 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
45 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
128 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
77 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
50 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
189 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
139 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
77 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
32 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
65 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
121 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
39 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
101 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
60 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
70 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
236 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
197 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
140 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
100 views

Asynchronous Angular Promise and Variable Initialization

I have a factory that looks like such: ...
6
votes
1answer
131 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
100 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
67 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
153 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
63 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
164 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
206 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
404 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
206 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
180 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
71 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
817 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
196 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
128 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
30 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
369 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
377 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
432 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 ...