System.Threading.Channels 10.0.0-preview.1.25080.5

About

The System.Threading.Channels library provides types for passing data asynchronously between producers and consumers.

Key Features

  • Abstractions representing channels for one or more producers to publish data to one or more consumers
  • APIs focused on asynchronous production and consumption of data
  • Factory methods for producing multiple kinds of channels

How to Use

using System;
using System.Threading.Channels;
using System.Threading.Tasks;

Channel<int> channel = Channel.CreateUnbounded<int>();

Task producer = Task.Run(async () =>
{
    int i = 0;
    while (true)
    {
        channel.Writer.TryWrite(i++);
        await Task.Delay(TimeSpan.FromSeconds(1));
    }
});

Task consumer = Task.Run(async () =>
{
    await foreach (int value in channel.Reader.ReadAllAsync())
    {
        Console.WriteLine(value);
    }
});

await Task.WhenAll(producer, consumer);

Main Types

The main types provided by this library are:

  • System.Threading.Channel<T>
  • System.Threading.Channel

Additional Documentation

https://www.nuget.org/packages/System.Threading.Tasks.Dataflow/

Feedback & Contributing

System.Threading.Channels is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Showing the top 20 packages that depend on System.Threading.Channels.

Packages Downloads
Azure.Search.Documents
This is the Azure Cognitive Search client library for developing .NET applications with rich search experiences. It enables you to query your indexes, update documents in your indexes, and manage indexes, synonym maps, indexers, data sources, or other service-level resources.
44
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
36
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
35
protobuf-net.Grpc
Package Description
34
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
34
StackExchange.Redis
High performance Redis client, incorporating both synchronous and asynchronous usage.
34
protobuf-net.Grpc
Package Description
33
Microsoft.CodeAnalysis.Workspaces.Common
A shared package used by the .NET Compiler Platform ("Roslyn") including support for analyzing projects and solutions. Do not install this package manually, it will be added as a prerequisite by other packages that require it. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/f99bb16a395e48a05520ba7af1549b20bfdeee36.
33
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
33
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
32
Microsoft.Azure.Functions.Worker.Grpc
This library provides gRPC support for Azure Functions .NET Worker communication with the Azure Functions Host.
31

https://go.microsoft.com/fwlink/?LinkID=799421

.NET Framework 4.6.2

.NET 8.0

  • No dependencies.

.NET 9.0

  • No dependencies.

.NET 10.0

  • No dependencies.

.NET Standard 2.0

.NET Standard 2.1

  • No dependencies.

Version Downloads Last updated
10.0.0-preview.1.25080.5 28 07/13/2025
9.0.0-preview.3.24172.9 25 08/09/2025
8.0.0-preview.4.23259.5 23 07/11/2025
7.0.0-preview.5.22301.12 18 07/09/2025
7.0.0-preview.4.22229.4 20 07/11/2025
6.0.2-mauipre.1.22102.15 23 07/11/2025
6.0.0-preview.3.21201.4 22 07/09/2025
5.0.0-rc.2.20475.5 21 07/09/2025
4.7.1 20 07/08/2025