示例#1
0
        private IEnumerable<RaceControl<string>> _testAsync(Race<string> race)
        {
            5.Log("Wait anywhere");
            Thread.Sleep(5);

            yield return race.RunAsync("a", () =>
                                                {
                                                    5.Log("Wait in a?");
                                                    Thread.Sleep(10);
                                                });

            yield return race.RunAs("b");
            10.Log("Wait in b?");
            Thread.Sleep(5);
        }