Added a close method for the generation pool.