Beispiel #1
0
        private static int ForkIt()
        {
            int a = 0;
            int b = 0;

            Fork.Begin()
            .Call(() => a = SomeSlowCall())
            .Call(() => b = SomeOtherSlowCall())
            .End();

            return(a + b);
        }
Beispiel #2
0
        public void ForkCall()
        {
            //Ok I don't quite know how to test if the execution was async

            bool var1 = false;
            bool var2 = false;

            Fork.Begin()
            .Call(() => var1 = true)
            .Call(() => var2 = true)
            .End();

            Assert.IsTrue(var1);
            Assert.IsTrue(var2);
        }