dotnet / dotnet/dotnet-api-docs
ChannelReader<T>.ReadAsync is incorrectly shown to return nullable ValueTask<T>
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
https://docs.microsoft.com/en-us/dotnet/api/system.threading.channels.channelreader-1.readasync?view=net-5.0 shows this C# code block:
```cs
public virtual System.Threading.Tasks.ValueTask? ReadAsync (System.Threading.CancellationToken cancellationToken = default);
```
The question mark is incorrect. The real return type is `ValueTask`, not `System.Nullable>`.
https://github.com/dotnet/runtime/blob/v5.0.0-rtm.20519.4/src/libraries/System.Threading.Channels/src/System/Threading/Channels/ChannelReader.cs#L44
https://github.com/dotnet/runtime/blob/v5.0.0-rtm.20519.4/src/libraries/System.Threading.Channels/ref/System.Threading.Channels.cs#L49
Contributor guide
Assessment
This issue has not been assessed yet.