摘要:
Task C#后台任务 C# 创建一个没有返回值的任务 using System; using System.Threading; using System.Threading.Tasks; class Program { static async Task Main(string[] args) 阅读全文
2025年1月23日 #
摘要:
回调函数 事件处理 dotnet .net 有界队列 背压机制(Backpressure)有界队列 通过有界队列来实现背压,确保生产者不会以超过消费者处理能力的速度发送数据。 using System.Threading.Channels; public class Program { static 阅读全文
摘要:
回调函数 dotnet .net 消费处理系统 生产者-消费者类型 一个简单的消息处理系统,它使用了.NET的System.Threading.Channels命名空间来创建一个无界的通道(channel),用于在不同的任务之间传递MessageWrapper对象。 无界限的消息队列(Unbound 阅读全文