Reputation: 365
A simple question:
Is there any way to get the number of messages in a System.Threading.Channels.Channel instance? Seems a bit odd there doesn't seem to be any builtin way to do it?
Upvotes: 0
Views: 1058
Reputation: 11
I believe there is a channel.Reader.Count
.
Note: this is counting the existing messages in the channel, not the channel capacity.
Reference:
Upvotes: 1