Skip to content

Comment on Parallel.For for pre C# 4.0

Comments

Disappointing but unsurprising that the data-parallel primitive in their standard library is the least-abstract, most-stateful implementation, and is named For/ForEach!

Could they at least implement slices, map, and fold/reduce?

All of these are implemented in Parallel Linq, though they're called "Take", "Select", and "Aggregate" (slices are the one I'm least familiar with, I could be flubbing that)

standard library? if you read the article, you would have seen that it's some guy's blog, not microsoft's C# API.

Yes, standard library! If you read the article, you would have seen that it's some guy's backport of a Microsoft API from C#4 to C#2-3.5.

That's actually what the name of the method is in .NET 4.0 (the official version).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.