Esempio n. 1
0
        public void MergableAsyncCall()
        {
            var ctx = new BSharpContext();
            var p1  = BSharpCompiler.CompileAsync("class A").ContinueWith(_ => ctx.Merge(_.Result));
            var p2  = BSharpCompiler.CompileAsync("class B").ContinueWith(_ => ctx.Merge(_.Result));
            var p3  = BSharpCompiler.CompileAsync("class C").ContinueWith(_ => ctx.Merge(_.Result));

            Task.WaitAll(p1, p2, p3);
            Assert.AreEqual(3, ctx.Working.Count);
        }