c# - _ = WriteItems(channel.Writer, count, delay); 中下划线的含义是什么?

标签 c# system.threading.channels

我正在阅读有关 SignalR 的内容,并且找到了代码:

  public ChannelReader<int> Counter(int count, int delay)
{
    var channel = Channel.CreateUnbounded<int>();

    // We don't want to await WriteItems, otherwise we'd end up waiting 
    // for all the items to be written before returning the channel back to
    // the client.
    _ = WriteItems(channel.Writer, count, delay);

    return channel.Reader;
}

下划线的含义是什么?是可变的吗?

最佳答案

我可能是错的,但它看起来像 discard对我来说。

关于c# - _ = WriteItems(channel.Writer, count, delay); 中下划线的含义是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52973145/

相关文章:

c# - 如何以编程方式读取附加依赖属性的值?

c# - 是否可以和/或建议在一个对象中使用多个 System.Threading.Channels?

c# - 如何避免在 ChannelReader.WaitToReadAsync 时抛出 InvalidOperationException?

c# - ds.Tables[0].Select() 代表什么

c# - SQLite Insert Into 命令导致崩溃。 (C#)

c# - 优化 RIA 服务的 Azure 存储查询

c# - 使用存储过程最优雅的方法是什么?

c# - Channel<T> 是否支持多个 ChannelReaders 和 ChannelWriters,或者每个都只支持一个?

c# - 如果 X 分钟内没有新项目进入 channel ,如何读取 Channel<T> 中小于批量大小的剩余项目?

c# - Channel的SingleReader设置为true时是否需要SemaphoreSlim