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(); }
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()); }