pool.shutdown() should always be in the finally part of a try ... finally block, as otherwise your program will fail with an exception but not exit because the pool wasn't properly shut down.