Wait for all reads/writes to complete before closing or opening a file descriptor.