Implemented immidiate cancellation of read as a task, not a main process.