示例#1
0
        public void Should_result_in_no_waiting_actions_in_the_queue()
        {
            Fiber fiber = new ThreadFiber();

            fiber.Enqueue(() => Thread.Sleep(1000));

            var called = new Future<bool>();

            fiber.Enqueue(() => called.Complete(true));

            fiber.ExecuteAll(12.Seconds());

            called.IsCompleted.ShouldBeTrue();
        }