开发者

AsParallel not available in Silverlight

I want to traverse all the children in some container (Grid, Canvas etc) in parallel way. I am not able to find AsParallel() even though i have reference to System.Linq. What should i do as a workaround for this to take advantage of full开发者_运维知识库 CPU power of client?

Thanks in advance:)


I am afraid that Parallel extensions didnt make it into SL 4.0

However rewriting function like Parallel.For shouldnt be too hard. You can find required code here in a great Joe Duffys article

http://msdn.microsoft.com/en-us/magazine/cc163427.aspx


A NuGet package has been available in this area,

http://www.nuget.org/packages/System.Threading.Tasks/

which uses Mono's source code and compiles for Silverlight/Windows Phone/.NET 3.5.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜