void TestEachSeriesGC() { var a = new int [] { 1, 2, 3 }; var series = UAsync.Async.EachSeries <int> ( a, ChildFunc <int> .Create(PrintInt), // ChildFunc<int>.Create (PrintIntCo), UAsyncFinalFunc.Create((object err) => { // Debug.Log ("Finish " + err); }) ); }
void TestSeriesGC() { var series = UAsync.Async.Series( // ChildFunc.Create ("one", SeriesFunc1), // ChildFunc.Create ("two", SeriesFunc2), ChildFunc.Create("three", SeriesFunc3), UAsyncFinalFunc.Create((object err, Dictionary <string, object> res) => { // Debug.Log ("Finish " + err); if (err == null) { } }) ); }
void TestParallelGC() { var parallel = UAsync.Async.Parallel( ChildFunc.Create("one", Func1), // ChildFunc.Create ("two", Func2), ChildFunc.Create("three", Func3), UAsyncFinalFunc.Create((object err, Dictionary <string, object> res) => { // Debug.Log ("Finish " + err); if (err == null) { // Debug.Log ("res " + res ["one"] + " " + res ["two"] + " " + res ["three"]); } }) ); // parallel.Cancel (); }
void TestSeries() { var series = UAsync.Async.Series( ChildFunc.Create("one", SeriesFunc1), ChildFunc.Create("two", SeriesFunc2), ChildFunc.Create("three", SeriesFunc3), UAsyncFinalFunc.Create((object err, Dictionary <string, object> res) => { Debug.Log("Finish " + err); if (err == null) { // Debug.Log ("res " + res ["one"] + " " + res ["two"] + " " + res ["three"]); } throw new Exception(); }) ); // UAsync.Async.CancelTask (series); }