System.Threading.Channels 10.0.0-preview.5.25277.114

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
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application. This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv
Libuv transport for the ASP.NET Core Kestrel cross-platform web server. This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/c5f85986e62dabfc0b7f2f2a45dc7c22e8ac815f
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/57512b49997283599b00a6b67d0ccebaec171daf
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/d0ca5a8d20ac50a33d5451e998a5d411a810c8d7
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/f0f9de5692adf1c0576de062f93c6ab7b176433f
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c967158b960823ccfcb19f1ef56426e2fd38eb3f
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/54e8b61777d42d2b10744d1987438ee5b8c0b24d
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/c75b3f7a2fb9fe21fd96c93c070fdfa88a2fbe97
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/3b519aa7d1a1b66e1d329d694f814e1d8228dc8c
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/cd9340856ed85215a911c97c44d52373f6cba2f9
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/f050ae044be8bddc002ab88736e4bf78dc822122
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/4ae1269bff83362236d0f3bd4c9302e6a1e9341c
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/be51b1aa73343e45a1d00afd436abad794f471fb
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/54142bcb25544b72fac28b1b061e7788c91c4f49
Microsoft.AspNetCore.SignalR.Client.Core
Client for ASP.NET Core SignalR This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/2924ca229b3d6c91b7c9eded119b31dfd7aa1fef

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 Last updated
10.0.0-preview.5.25277.114 06/11/2025
10.0.0-preview.4.25258.110 05/13/2025
10.0.0-preview.3.25171.5 04/21/2025
10.0.0-preview.2.25163.2 03/22/2025
10.0.0-preview.1.25080.5 03/22/2025
9.0.6 06/15/2025
9.0.5 05/15/2025
9.0.4 04/21/2025
9.0.3 03/16/2025
9.0.2 03/16/2025
9.0.1 04/30/2025
9.0.0 06/07/2025
9.0.0-rc.2.24473.5 05/07/2025
9.0.0-rc.1.24431.7 03/17/2025
9.0.0-preview.7.24405.7 03/17/2025
9.0.0-preview.6.24327.7 03/24/2025
9.0.0-preview.5.24306.7 05/23/2025
9.0.0-preview.4.24266.19 05/23/2025
9.0.0-preview.3.24172.9 03/16/2025
9.0.0-preview.2.24128.5 03/21/2025
9.0.0-preview.1.24080.9 03/17/2025
8.0.0 03/29/2025
8.0.0-rc.2.23479.6 03/22/2025
8.0.0-rc.1.23419.4 05/04/2025
8.0.0-preview.7.23375.6 03/31/2025
8.0.0-preview.6.23329.7 03/17/2025
8.0.0-preview.5.23280.8 03/22/2025
8.0.0-preview.4.23259.5 05/16/2023
8.0.0-preview.3.23174.8 03/20/2025
8.0.0-preview.2.23128.3 03/17/2025
8.0.0-preview.1.23110.8 03/22/2025
7.0.0 03/12/2025
7.0.0-rc.2.22472.3 03/16/2025
7.0.0-rc.1.22426.10 03/16/2025
7.0.0-preview.7.22375.6 03/21/2025
7.0.0-preview.6.22324.4 03/22/2025
7.0.0-preview.5.22301.12 06/12/2025
7.0.0-preview.4.22229.4 03/21/2025
7.0.0-preview.3.22175.4 03/17/2025
7.0.0-preview.2.22152.2 03/20/2025
7.0.0-preview.1.22076.8 03/31/2025
6.0.0 03/27/2025
6.0.0-rc.2.21480.5 05/27/2025
6.0.0-rc.1.21451.13 03/20/2025
6.0.0-preview.7.21377.19 03/26/2025
6.0.0-preview.6.21352.12 07/14/2021
6.0.0-preview.5.21301.5 04/16/2025
6.0.0-preview.4.21253.7 03/20/2025
6.0.0-preview.3.21201.4 04/29/2025
6.0.0-preview.2.21154.6 03/22/2025
6.0.0-preview.1.21102.12 03/31/2025
5.0.0 03/22/2025
5.0.0-rc.2.20475.5 03/31/2025
5.0.0-rc.1.20451.14 03/22/2025
5.0.0-preview.8.20407.11 03/16/2025
5.0.0-preview.7.20364.11 03/17/2025
5.0.0-preview.6.20305.6 03/17/2025
5.0.0-preview.5.20278.1 03/17/2025
5.0.0-preview.4.20251.6 03/14/2025
5.0.0-preview.3.20214.6 03/20/2025
5.0.0-preview.2.20160.6 03/22/2025
5.0.0-preview.1.20120.5 03/16/2020
4.7.1 03/22/2025
4.7.0 04/23/2025
4.7.0-preview3.19551.4 03/22/2025
4.7.0-preview2.19523.17 03/20/2025
4.7.0-preview1.19504.10 10/15/2019
4.6.0 06/12/2025
4.6.0-rc1.19456.4 03/22/2025
4.6.0-preview9.19421.4 03/20/2025
4.6.0-preview9.19416.11 09/04/2019
4.6.0-preview8.19405.3 03/24/2025
4.6.0-preview7.19362.9 03/22/2025
4.6.0-preview6.19303.8 03/21/2025
4.6.0-preview6.19264.9 03/21/2025
4.6.0-preview5.19224.8 05/02/2025
4.6.0-preview4.19212.13 03/22/2025
4.6.0-preview3.19128.7 03/22/2025
4.6.0-preview.19073.11 03/16/2025
4.6.0-preview.18571.3 06/15/2025
4.5.0 05/30/2025
4.5.0-rc1 03/17/2025
4.5.0-preview2-26406-04 03/12/2025
4.5.0-preview1-26216-02 03/20/2025