Avoid TypeError in Pool.__del__ during shutdown.