Can i cancel StreamReader.ReadLineAsync with a CancellationToken?
问题 When I cancel my async method with the following content by calling the Cancel() method of my CancellationTokenSource , it will stop eventually. However since the line Console.WriteLine(await reader.ReadLineAsync()); takes quite a bit to complete, I tried to pass my CancellationToken to ReadLineAsync() as well (expecting it to return an empty string) in order to make the method more responsive to my Cancel() call. However I could not pass a CancellationToken to ReadLineAsync() . Can I cancel