Shutdown the internal pool to avoid deadlocks