Don't do I/O if the thread is interrupted.