Esempio n. 1
0
        public void TestToAsyncResult()
        {
            _compute.Broadcast(new SleepAction());

            IFuture fut = _compute.GetFuture();

            var asyncRes = fut.ToAsyncResult();

            Assert.IsFalse(asyncRes.IsCompleted);

            Assert.IsTrue(asyncRes.AsyncWaitHandle.WaitOne(1000));

            Assert.IsTrue(asyncRes.IsCompleted);
        }