Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 920 Bytes

README.md

File metadata and controls

38 lines (27 loc) · 920 Bytes

AsyncTools

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);
	// ...
}

Installing and using

haxelib install asynctools

using AsyncTools

class YourClass implements Async