在C#中实现生产者/消费者模式[英] Implementing the Producer/Consumer Pattern in C#

本文是小编为大家收集整理的关于在C#中实现生产者/消费者模式的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

如何使用 Events 和 Delegates 在 C# 中实现 Producer/Consumer 模式?在使用这些设计模式时,我需要注意哪些资源?有什么我需要注意的边缘情况吗?

解决方案

看看这个链接 MSDN上

本文地址:https://www.itbaoku.cn/post/627784.html

问题描述

How can I implement the Producer/Consumer patterns in C# using Events and Delegates? What do I need to keep an eye out for when it comes to resources when using these design patterns? Are there any edge cases I need to be aware of?

推荐答案

Have a look at this link on MSDN