ParallelLoopResult 结构

定义

提供执行 Parallel 循环的完成状态。Provides completion status on the execution of a Parallel loop.

public value class ParallelLoopResult
public struct ParallelLoopResult
type ParallelLoopResult = struct
Public Structure ParallelLoopResult
继承
ParallelLoopResult

注解

如果 IsCompleted 返回 true,则循环运行到完成,以便循环的所有迭代都已执行。If IsCompleted returns true, then the loop ran to completion, such that all iterations of the loop were executed. 如果 IsCompleted 返回 false,并且 LowestBreakIteration 返回 null,则使用对 Stop 的调用来提前结束循环。If IsCompleted returns false and LowestBreakIteration returns null, a call to Stop was used to end the loop prematurely. 如果 IsCompleted 返回 false,并且 LowestBreakIteration 返回非 null 整数值,则 Break 用于提前结束循环。If IsCompleted returns false and LowestBreakIteration returns a non-null integral value, Break was used to end the loop prematurely.

属性

IsCompleted

获取该循环是否已运行完成(即,该循环的所有迭代均已执行,并且该循环没有收到提前结束的请求)。Gets whether the loop ran to completion, such that all iterations of the loop were executed and the loop didn't receive a request to end prematurely.

LowestBreakIteration

获取从中调用 Break() 的最低迭代的索引。Gets the index of the lowest iteration from which Break() was called.

适用于

线程安全性

ParallelLoopResult 的所有公共成员都是线程安全的,并且可以同时从多个线程调用。All public members of ParallelLoopResult are thread safe and may be called from multiple threads concurrently.

另请参阅