Search code examples
c#system.threading.channels

What is the meaning of underscore in _ = WriteItems(channel.Writer, count, delay);


I'm reading about SignalR and I have found code:

  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;
}

What is the meaning of underscore? Is it variable?


Solution

  • I could be wrong but it looks like a discard to me.