Several classes in the .NET Framework Base Class Library (BCL) provide both synchronous and asynchronous method signatures. Because a synchronous method call can create a delay in program flow, an ...
var a, async = function(f) { setTimeout(function() { var r = 'step 2'; f(r); }, 1); }, myFunc = function() { a = 'step 1'; async(function(r) { a = r; // should reset ...