The tag has no wiki summary.

learn more… | top users | synonyms

10
votes
2answers
3k views

async+await == sync?

Stumbled upon this post that talks about making async web requests. Now simplicity aside, if in real world, all you do is make an async request and wait for it in the very next line, isn't that the ...
10
votes
1answer
2k views

Learning Asynchronous programming

Asynchronous non-blocking event driven programming seems to be all the rage. I have a basic conceptual understanding of what this all means. However what I'm not sure is when and where my code can ...
9
votes
2answers
4k views

How does Javascript code become asynchronous when using callbacks?

I've been doing a lot of reading online trying to figure out how to write asynchronous JavaScript code. One of the techniques that has come up a lot in my research is to use callbacks. While I ...
8
votes
3answers
2k views

What determines which Javascript functions are blocking vs non-blocking?

I have been doing web-based Javascript (vanilla JS, jQuery, Backbone, etc.) for a few years now, and recently I've been doing some work with Node.js. It took me a while to get the hang of ...
6
votes
1answer
2k views

How can NodeJS be “non-blocking”?

I'm learning NodeJS and just wanted to clarify something. In several introductory tutorials and books so far, very early on they've described Node's "non-blocking" architecture - or rather that it's ...
6
votes
1answer
406 views

How can we calculate Big-O complexity in Functional & Reactive Programming

I started learning functional programming, I am trying to compare between different algorithms that are written in an imperative, functional , parallel programming and using Collections and Lambda ...
4
votes
1answer
360 views

Blurring the lines between async and regular functions in C# 5.0

Lately I can't seem to get enough of the amazing async-await pattern of C# 5.0. Where have you been all my life? I'm absolutely thrilled with the simple syntax, but I'm having one small difficulty. ...
4
votes
1answer
272 views

Efficient mixing of sync and async methods within a single method?

Okay, it sounds odd, but the code is very simple and explains the situation well. public virtual async Task RemoveFromRoleAsync(AzureTableUser user, string role) { AssertNotDisposed(); var ...
3
votes
5answers
2k views

Is it possible to half-way synchronize javascript functions that include async calls?

I am wondering if there exists a way to half way synchronize javascript functions, where data is requested on the fly. I don't want to make it purely blocking (which I guess is impossible), I just ...
2
votes
1answer
82 views

Reporting and handling asynchronous process errors to a client

I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) ...
1
vote
6answers
391 views

Benchmark of asynchronous code

Asynchronous programming seems to be getting quite popular these days. One of the most quoted advantages is performance gain from removing operations that block threads. But I also saw people saying ...
1
vote
2answers
283 views

Transitioning to asynchronous programming model

our team is mantaining and developing a .NET web service written in C#. We have stress tested the web service's farm and we have evidence that the actual architecture doesn't scale well, as the number ...
1
vote
3answers
302 views

Which layer does async code belong?

I am developing an application that consumes data from an external service. The application is being implemented following a typical layered architecture with UI, Presentation, Domain and Data ...
1
vote
3answers
273 views

Synchronization in the given Code

I had an interview few weeks back, and I was asked to write a code with Setters and Getters. I had written the following code; // Just an example Class ABC{ private int num; public void ...
1
vote
2answers
214 views

In an event-driven environment, how should a “cancel” function abort all further events?

In my iOS app, things are mostly driven by events. The user presses a button The app listens for an external device to be connected to the iOS device Once the device is detected (is connected), an ...
1
vote
0answers
73 views

What are the benefits of Android way of “saving memory” - explicitly passing Context objects everywhere?

Turned out, this question is not easy to formulate for me, but let's try. In Android, pretty much any UI object depends on a Context, and has defined lifetime. It also can destroy and recreate UI ...
1
vote
0answers
103 views

Is Windows Workflow Foundation appropriate for a CPU-heavy async application?

At one of the DevDays conferences a presenter said that Workflow Foundation isn't just for applications that require persistence, but they can make it easier to write and maintain Async WCF code and ...
1
vote
2answers
828 views

Design pattern for client/server sessions? [closed]

Are there any common patterns or general guidance I can learn from for how to design a client/server system where the both the client and server must maintain some kind per-client session state? I've ...
0
votes
1answer
90 views

Term for an error when code is executed before its ajax response? [closed]

What's the term for an error caused by executing a block of code before its relevant ajax response has come back? e.g., a timeline: 13:00:01 execute getDataViaAjax(); 13:00:02 execute ...
0
votes
2answers
160 views

Why would Java app make RPC call to itself?

I am working with a multithreaded homegrown multi-module app in my new job. We use the the Thrift protocol to communicate RPC calls between different stand-alone applications in a distributed system. ...
0
votes
1answer
244 views

Provide multiple SendCompleted callbacks to SmtpClient

I have an Email class that has a Send method that optionally takes an SmtpClient and sends an email asynchronously using SendAsync. If no SmtpClient is supplied to this method, it instantiates a ...
0
votes
0answers
12 views

Gevent - Make blocking calls non-blocking

I have the blocking code shown below. Is calling monkey.patch_all() enough/optimal to make it non-blocking? Does Gevent handle iterations like these? # front page def front_page(): database = ...
0
votes
1answer
326 views

Good practice using signals and event driven system

I am using signals (specifically Boost signals2) to create an event driven protocol API and model. Most elements have their own signals, and there are usually multiple of each element. Consider a ...
0
votes
1answer
269 views

Design pattern for locking asynchronous operations in Objective-C

I'm writing my first Objective-C Class. It's responsible for interaction with an HTTP SSO authentication service. The process requires multiple HTTP transactions in order to complete. The Class acts ...
0
votes
2answers
60 views

Making server logic independent of client interaction

I'm trying to make a realtime multiplayer web-game in node.js with express framework and socket.io library. But I can't seem to make my server-side logic independent of client interactions. I want ...