`Close()`: Wait for the read/write loops to exit.