예제 #1
0
        public void SimplePush_Ok()
        {
            var pool = JobsPool.Get();

            pool.SimplePush(Task.Run(() => {}));
            pool.SimplePush(Task.Run(() => {}));
            Assert.AreEqual(2, JobsPool.PoolSize());
            pool.WaitAll();
            pool.CleanUp();
        }
예제 #2
0
        public void CleanUp_Ok()
        {
            var pool = JobsPool.Get();

            pool.SimplePush(Task.Run(() => {}));
            pool.SimplePush(Task.Run(() => {}));
            Assert.True(JobsPool.PoolSize() == 2);
            pool.WaitAll();
            pool.CleanUp();
            Assert.Zero(JobsPool.PoolSize());
        }