<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Parallelism in .NET &#8211; Part 3, Imperative Data Parallelism: Early Termination</title>
	<atom:link href="http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/feed/" rel="self" type="application/rss+xml" />
	<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/</link>
	<description>Thoughts on C#, WPF, .NET, and programming for Scientific Visualization</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:38:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Reed</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-1561</link>
		<dc:creator>Reed</dc:creator>
		<pubDate>Sat, 15 Jan 2011 18:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-1561</guid>
		<description>Chris,

It&#039;s definitely confusing, at first glance.

The issue is that .Break() was (first) called on element 11, 12, or 13 (impossible to know which), which means that all elements up to that element are guaranteed to be scheduled.  However, element 15 (and possibly 12/13) were already scheduled and being processed at the point, but 14 was not.  Since there is no logic in the loop body to check whether a break was requested, elements that were scheduled (ie: 15) will run to completion.  The Break(), however, just prevents NEW elements with an index greater than the one that first called Break() to get scheduled.  As a result, 15 still prints, but 14 does not.

Does that clarify things?

-Reed</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>It&#8217;s definitely confusing, at first glance.</p>
<p>The issue is that .Break() was (first) called on element 11, 12, or 13 (impossible to know which), which means that all elements up to that element are guaranteed to be scheduled.  However, element 15 (and possibly 12/13) were already scheduled and being processed at the point, but 14 was not.  Since there is no logic in the loop body to check whether a break was requested, elements that were scheduled (ie: 15) will run to completion.  The Break(), however, just prevents NEW elements with an index greater than the one that first called Break() to get scheduled.  As a result, 15 still prints, but 14 does not.</p>
<p>Does that clarify things?</p>
<p>-Reed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-1560</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 15 Jan 2011 13:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-1560</guid>
		<description>Hi there,

First of all, thank you for writing this excellent series.

I&#039;m a little confused as to why 14 was not part of the output in the example above. Since 15 was outputted, I would have thought this meant that 14 must have been allocated to a thread and allowed to complete.

Thanks,
Chris</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>First of all, thank you for writing this excellent series.</p>
<p>I&#8217;m a little confused as to why 14 was not part of the output in the example above. Since 15 was outputted, I would have thought this meant that 14 must have been allocated to a thread and allowed to complete.</p>
<p>Thanks,<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parallelism in .NET &#8211; Part 10, Cancellation in PLINQ and the Parallel class : Reed Copsey, Jr.</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-737</link>
		<dc:creator>Parallelism in .NET &#8211; Part 10, Cancellation in PLINQ and the Parallel class : Reed Copsey, Jr.</dc:creator>
		<pubDate>Thu, 18 Feb 2010 01:35:38 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-737</guid>
		<description>[...] its typically a good practice to allow that routine to be cancelled.&#160; I previously discussed terminating a parallel loop from within, but have not demonstrated how a routine can be cancelled from the caller’s perspective.&#160; [...]</description>
		<content:encoded><![CDATA[<p>[...] its typically a good practice to allow that routine to be cancelled.&#160; I previously discussed terminating a parallel loop from within, but have not demonstrated how a routine can be cancelled from the caller’s perspective.&#160; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parallelism in .NET &#8211; Part 7, Some Differences between PLINQ and LINQ to Objects : Reed Copsey, Jr.</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-632</link>
		<dc:creator>Parallelism in .NET &#8211; Part 7, Some Differences between PLINQ and LINQ to Objects : Reed Copsey, Jr.</dc:creator>
		<pubDate>Thu, 28 Jan 2010 21:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-632</guid>
		<description>[...] everything.&#160; When using PLINQ in order to parallelize your routines declaratively, the same guideline I mentioned before still [...]</description>
		<content:encoded><![CDATA[<p>[...] everything.&#160; When using PLINQ in order to parallelize your routines declaratively, the same guideline I mentioned before still [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Parallelism in .NET &#8211; Part 4, Imperative Data Parallelism: Aggregation : Reed Copsey, Jr.</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-572</link>
		<dc:creator>Parallelism in .NET &#8211; Part 4, Imperative Data Parallelism: Aggregation : Reed Copsey, Jr.</dc:creator>
		<pubDate>Sat, 23 Jan 2010 01:14:43 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-572</guid>
		<description>[...] This delegate will receive three arguments: our original element from the collection (TSource), a ParallelLoopState which we can use for early termination, and the instance of our local state we created (TLocal).&#160; It should do whatever processing [...]</description>
		<content:encoded><![CDATA[<p>[...] This delegate will receive three arguments: our original element from the collection (TSource), a ParallelLoopState which we can use for early termination, and the instance of our local state we created (TLocal).&#160; It should do whatever processing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Parallelism in .NET – Part 3, Imperative Data Parallelism: Early Termination : Reed Copsey, Jr. -- Topsy.com</title>
		<link>http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-569</link>
		<dc:creator>Tweets that mention Parallelism in .NET – Part 3, Imperative Data Parallelism: Early Termination : Reed Copsey, Jr. -- Topsy.com</dc:creator>
		<pubDate>Fri, 22 Jan 2010 22:26:42 +0000</pubDate>
		<guid isPermaLink="false">http://reedcopsey.com/2010/01/22/parallelism-in-net-part-3-imperative-data-parallelism-early-termination/#comment-569</guid>
		<description>[...] This post was mentioned on Twitter by Reed Copsey, Jr., Caspar Kleijne. Caspar Kleijne said: Parallelism in .NET. Part 3: Early Termination http://bit.ly/5KDMXX #csharp #dotnet /via @ReedCopsey [...]
</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Reed Copsey, Jr., Caspar Kleijne. Caspar Kleijne said: Parallelism in .NET. Part 3: Early Termination <a href="http://bit.ly/5KDMXX" rel="nofollow">http://bit.ly/5KDMXX</a> #csharp #dotnet /via @ReedCopsey [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
 
