w32: Change the way the I/O threads are cleaned up.