Exemple #1
0
    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);
        })
                );
    }
Exemple #2
0
    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)
            {
            }
        })
                );
    }
Exemple #3
0
    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 ();
    }
Exemple #4
0
    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);
    }