Graceful termination of I/O tasks.