A Haxe implementation of Async. The most important parts are working:
- aEach, aEachSeries, aEachLimit
- aMap, aMapSeries, aMapLimit
- aFilter, aFilterSeries, aFilterLimit
Also includes a slightly modified version of the @async
feature in haxe-js-kit
The change is that you can do this:
class YourClass implements Async {
function anAsyncMethod(done : Error -> Void) : Void {
var err = @async(err => done) some.otherAsync();
// ...
}
}
Which will add an if statement directly after the call:
function anAsyncMethod(done : Error -> Void) : Void {
var err = @async(err => done) some.otherAsync();
if(err != null) return done(err);
// ...
}
haxelib install asynctools
using AsyncTools
class YourClass implements Async