EnumerablePartitionerOptions.NoBuffering - 部分支持项之间的依赖关系 [英] EnumerablePartitionerOptions.NoBuffering – partial support for dependencies between items

查看:118
本文介绍了EnumerablePartitionerOptions.NoBuffering - 部分支持项之间的依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

EnumerablePartitionerOptions。 NoBuffering定义sais:"

创建一个分区程序,一次从可枚举的源中获取项目,并且不使用可以更有效地访问的中间存储通过多个线程。此选项提供对低延迟的支持(项目将尽快处理,因为它们可从源获得)并且为项目之间的依赖关系提供部分支持(线程无法死锁等待线程本身负责的项目处理)。"。

EnumerablePartitionerOptions.NoBuffering definition sais: "

Create a partitioner that takes items from the source enumerable one at a time and does not use intermediate storage that can be accessed more efficiently by multiple threads. This option provides support for low latency (items will be processed as soon as they are available from the source) and provides partial support for dependencies between items (a thread cannot deadlock waiting for an item that the thread itself is responsible for processing).".

"项目之间依赖关系的部分支持到底是什么"?

What exactly is "partial support for dependencies between items"?

推荐答案

Hi User919,

Hi User919,

感谢您在此发帖,对不起,迟到的回复。

Thank you for posting here and sorry for late reply.

>> 到底是什么是"部分支持项目之间的依赖关系"?

它在括号中有一个很好的解释,一个线程不能死锁等待一个项目线程本身负责处理。 

It has a good explanation in brackets a thread can not deadlock waiting for an item that the thread itself is responsible for processing. 

提供了对资源的共享访问可以创建冲突。为避免冲突,您必须同步或控制对共享资源的访问。无法正确同步访问
(在相同或不同的应用程序域中)可能导致诸如死锁(其中两个线程在每个等待另一个线程完成时停止响应)和竞争条件(当发生异常结果时)的问题由于意外的关键
依赖于两个事件的时间)。系统提供可用于协调多个线程之间的资源共享的同步对象。减少线程数可以更容易地同步资源。

有关详细信息,请参阅MSDN文章  线程和线程

For more details, please refer to the MSDN article Threads and Threading.

最诚挚的问候,

Wendy


这篇关于EnumerablePartitionerOptions.NoBuffering - 部分支持项之间的依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆