System.Threading.Channels 10.0.3

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
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
124
Microsoft.CodeAnalysis.CSharp.Features
.NET Compiler Platform ("Roslyn") support for creating C# editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
114
Microsoft.CodeAnalysis.CSharp.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/fa72fa61b0d822ea8a3fbeb96f668340419ab5cd.
112
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one of the following packages to add the appropriate language support: - Microsoft.CodeAnalysis.CSharp.Workspaces - Microsoft.CodeAnalysis.VisualBasic.Workspaces More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e482b6e281d7db727fcb086ebbfae44dcba82c6d.
110
Microsoft.CodeAnalysis.VisualBasic.Features
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/be9c072e1c8a9e6701e34d796b1d68098d08feab.
109
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/66772aff549b2981094175a6f2f69600596c1913.
109
Microsoft.CodeAnalysis.CSharp.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/be9c072e1c8a9e6701e34d796b1d68098d08feab.
106
Microsoft.CodeAnalysis.VisualBasic.Features
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/f99bb16a395e48a05520ba7af1549b20bfdeee36.
106
Microsoft.CodeAnalysis.CSharp.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/2b7d172669b2f7e55803b55f317cfcc2d4279d76.
105
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/44555193fd1135b5d53a2099f76fec91e0d1ebde.
104
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/c3cc1d0ceeab1a65da0217e403851a1e8a30086a.
104
Microsoft.CodeAnalysis.CSharp.Workspaces
.NET Compiler Platform ("Roslyn") support for analyzing C# projects and solutions. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e482b6e281d7db727fcb086ebbfae44dcba82c6d.
103
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/bf8791d0d1be92c24e56cefa52aa139e2b5340c2.
103
Microsoft.CodeAnalysis.Workspaces.MSBuild
.NET Compiler Platform ("Roslyn") support for analyzing MSBuild projects and solutions. This should be used with at least one of the following packages to add the appropriate language support: - Microsoft.CodeAnalysis.CSharp.Workspaces - Microsoft.CodeAnalysis.VisualBasic.Workspaces More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/bde21ee2b98b775b010d01a93f81ef587fe80962.
103
Microsoft.CodeAnalysis.CSharp.Features
.NET Compiler Platform ("Roslyn") support for creating C# editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/bf8791d0d1be92c24e56cefa52aa139e2b5340c2.
103
Microsoft.CodeAnalysis.VisualBasic.Features
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
103
Microsoft.CodeAnalysis.VisualBasic.Features
.NET Compiler Platform ("Roslyn") support for creating Visual Basic editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e482b6e281d7db727fcb086ebbfae44dcba82c6d.
102
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/6544980c8335ce25d8959afd4b6ee308686fed53.
102
Microsoft.CodeAnalysis.Features
.NET Compiler Platform ("Roslyn") support for creating editing experiences. More details at https://aka.ms/roslyn-packages This package was built from the source at https://github.com/dotnet/roslyn/commit/e68227ea677b76a3c603bd616f03ea6d952b2458.
102
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/e091728607ca0fc9efca55ccfb3e59259c6b5a0a.
101

.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
11.0.0-preview.2.26159.112 2 3/12/2026
11.0.0-preview.1.26104.118 6 2/12/2026
10.0.5 1 3/14/2026
10.0.4 2 3/12/2026
10.0.3 6 2/12/2026
10.0.2 11 1/15/2026
10.0.1 21 12/10/2025
10.0.0 36 11/12/2025
10.0.0-rc.2.25502.107 48 10/14/2025
10.0.0-rc.1.25451.107 59 9/10/2025
10.0.0-preview.7.25380.108 63 8/15/2025
10.0.0-preview.6.25358.103 63 7/16/2025
10.0.0-preview.5.25277.114 78 6/7/2025
10.0.0-preview.4.25258.110 59 5/17/2025
10.0.0-preview.3.25171.5 65 4/15/2025
10.0.0-preview.2.25163.2 68 3/23/2025
10.0.0-preview.1.25080.5 87 2/27/2025
9.0.14 2 3/12/2026
9.0.13 5 2/12/2026
9.0.12 9 1/16/2026
9.0.11 36 11/12/2025
9.0.10 49 10/14/2025
9.0.9 62 9/10/2025
9.0.8 77 8/8/2025
9.0.7 70 7/11/2025
9.0.6 75 6/16/2025
9.0.5 92 5/18/2025
9.0.4 74 4/11/2025
9.0.3 92 3/15/2025
9.0.2 96 2/16/2025
9.0.1 104 1/22/2025
9.0.0 110 11/19/2024
9.0.0-rc.2.24473.5 87 10/25/2024
9.0.0-rc.1.24431.7 84 9/12/2024
9.0.0-preview.7.24405.7 95 8/14/2024
9.0.0-preview.6.24327.7 89 7/10/2024
9.0.0-preview.5.24306.7 94 6/16/2024
9.0.0-preview.4.24266.19 86 5/28/2024
9.0.0-preview.3.24172.9 105 4/13/2024
9.0.0-preview.2.24128.5 85 3/16/2024
9.0.0-preview.1.24080.9 101 2/27/2024
8.0.0 111 11/15/2023
8.0.0-rc.2.23479.6 131 10/13/2023
8.0.0-rc.1.23419.4 103 9/15/2023
8.0.0-preview.7.23375.6 106 8/20/2023
8.0.0-preview.6.23329.7 108 7/23/2023
8.0.0-preview.5.23280.8 108 8/1/2023
8.0.0-preview.4.23259.5 110 7/15/2023
8.0.0-preview.3.23174.8 125 5/13/2023
8.0.0-preview.2.23128.3 102 3/17/2023
8.0.0-preview.1.23110.8 116 2/22/2023
7.0.0 135 12/4/2022
7.0.0-rc.2.22472.3 119 12/4/2022
7.0.0-rc.1.22426.10 117 9/15/2022
7.0.0-preview.7.22375.6 112 9/16/2022
7.0.0-preview.6.22324.4 102 9/16/2022
7.0.0-preview.5.22301.12 102 9/16/2022
7.0.0-preview.4.22229.4 115 9/16/2022
7.0.0-preview.3.22175.4 114 9/16/2022
7.0.0-preview.2.22152.2 109 9/16/2022
7.0.0-preview.1.22076.8 114 9/16/2022
6.0.2-mauipre.1.22102.15 143 9/16/2022
6.0.2-mauipre.1.22054.8 89 9/16/2022
6.0.0 117 9/16/2022
6.0.0-rc.2.21480.5 101 9/16/2022
6.0.0-rc.1.21451.13 126 9/16/2022
6.0.0-preview.7.21377.19 98 9/16/2022
6.0.0-preview.6.21352.12 104 9/16/2022
6.0.0-preview.5.21301.5 105 9/16/2022
6.0.0-preview.4.21253.7 108 9/16/2022
6.0.0-preview.3.21201.4 107 9/16/2022
6.0.0-preview.2.21154.6 102 9/16/2022
6.0.0-preview.1.21102.12 104 9/16/2022
5.0.0 113 9/16/2022
5.0.0-rc.2.20475.5 96 9/16/2022
5.0.0-rc.1.20451.14 107 9/16/2022
5.0.0-preview.8.20407.11 103 9/16/2022
5.0.0-preview.7.20364.11 106 9/16/2022
5.0.0-preview.6.20305.6 124 9/16/2022
5.0.0-preview.5.20278.1 100 9/16/2022
5.0.0-preview.4.20251.6 103 9/16/2022
5.0.0-preview.3.20214.6 114 9/16/2022
5.0.0-preview.2.20160.6 116 9/16/2022
5.0.0-preview.1.20120.5 96 9/16/2022
4.7.1 140 9/16/2022
4.7.0 114 9/16/2022
4.7.0-preview3.19551.4 96 9/16/2022
4.7.0-preview2.19523.17 98 9/16/2022
4.7.0-preview1.19504.10 103 9/16/2022
4.6.0 127 9/16/2022
4.6.0-rc1.19456.4 114 9/16/2022
4.6.0-preview9.19421.4 102 9/16/2022
4.6.0-preview9.19416.11 91 9/16/2022
4.6.0-preview8.19405.3 108 9/16/2022
4.6.0-preview7.19362.9 102 9/16/2022
4.6.0-preview6.19303.8 100 9/16/2022
4.6.0-preview6.19264.9 100 9/16/2022
4.6.0-preview5.19224.8 103 9/16/2022
4.6.0-preview4.19212.13 99 9/16/2022
4.6.0-preview3.19128.7 111 9/16/2022
4.6.0-preview.19073.11 101 9/16/2022
4.6.0-preview.18571.3 105 9/16/2022
4.5.0 107 9/16/2022
4.5.0-rc1 111 9/16/2022
4.5.0-preview2-26406-04 100 9/16/2022
4.5.0-preview1-26216-02 106 9/16/2022