System.Threading.Channels 9.0.1
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
Related Packages
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 |
---|---|
Grpc.HealthCheck
gRPC C# Health Checking
|
2 |
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.
|
2 |
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.
|
2 |
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/75e79dace86b274327a1afe479228d82a06051a4.
|
2 |
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/75e79dace86b274327a1afe479228d82a06051a4.
|
2 |
Microsoft.AspNetCore.SignalR.Core
Real-time communication framework for ASP.NET Core.
|
2 |
Microsoft.Orleans.Core
Core library of Microsoft Orleans used both on the client and server.
|
2 |
Npgsql
Npgsql is the open source .NET data provider for PostgreSQL.
|
2 |
Microsoft.Orleans.OrleansRuntime
Core runtime library of Microsoft Orleans that hosts and executes grains within a silo.
|
2 |
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/bde21ee2b98b775b010d01a93f81ef587fe80962.
|
2 |
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.
|
2 |
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/e68227ea677b76a3c603bd616f03ea6d952b2458.
|
2 |
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.
|
2 |
Microsoft.AspNetCore.SignalR.Core
Real-time communication framework for ASP.NET Core.
This package was built from the source at:
https://github.com/aspnet/SignalR/tree/8c9093332b90e8a64497ebb8bc06ed84a99b1615
|
2 |
StackExchange.Redis
High performance Redis client, incorporating both synchronous and asynchronous usage.
|
2 |
https://go.microsoft.com/fwlink/?LinkID=799421
.NET Framework 4.6.2
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.1)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET 8.0
- No dependencies.
.NET 9.0
- No dependencies.
.NET Standard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.1)
- System.Threading.Tasks.Extensions (>= 4.5.4)
.NET Standard 2.1
- No dependencies.