Cancel threads to ensure they abort blocking I/O operations.