How Many Tasks does the Parallel.For spawn?I'm trying to get a better understanding of the co-relation between the number of tasks and the number of items in the underlying collection on which &quot;Parallel.For&quot; executes. I've noticed that when I call &quot;Parallel.For&quot; on a query which yields say 100 elements, only 2 tasks are created(on my dual core system), I've heard that &quot;Parallel.For&quot; does not create a task per element of the collection on which it is operating on, is this true?<br/> If so what is the algorithm that &quot;Parallel.For&quot; uses for figuring out how many Tasks to create and which queue should the tasks be queued up at<br/>© 2009 Microsoft Corporation. All rights reserved.Sun, 28 Jun 2009 00:12:22 Zde169ace-59fc-4ffe-95b2-28488f4d2245http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#de169ace-59fc-4ffe-95b2-28488f4d2245http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#de169ace-59fc-4ffe-95b2-28488f4d2245Abhijeet Patelhttp://social.msdn.microsoft.com/Profile/en-US/?user=Abhijeet%20PatelHow Many Tasks does the Parallel.For spawn?I'm trying to get a better understanding of the co-relation between the number of tasks and the number of items in the underlying collection on which &quot;Parallel.For&quot; executes. I've noticed that when I call &quot;Parallel.For&quot; on a query which yields say 100 elements, only 2 tasks are created(on my dual core system), I've heard that &quot;Parallel.For&quot; does not create a task per element of the collection on which it is operating on, is this true?<br/> If so what is the algorithm that &quot;Parallel.For&quot; uses for figuring out how many Tasks to create and which queue should the tasks be queued up at<br/>Sat, 27 Jun 2009 22:46:54 Z2009-06-27T22:46:54Zhttp://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#4ee1e6f7-f574-4b3f-928e-521568397d70http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#4ee1e6f7-f574-4b3f-928e-521568397d70Stephen Toub - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Stephen%20Toub%20-%20MSFTHow Many Tasks does the Parallel.For spawn?This blog post should help:<br/><a href="http://blogs.msdn.com/pfxteam/archive/2009/05/26/9641563.aspx">http://blogs.msdn.com/pfxteam/archive/2009/05/26/9641563.aspx</a>Sat, 27 Jun 2009 23:36:22 Z2009-06-27T23:36:42Zhttp://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#8b284135-c254-42f6-b093-c9faf476e957http://social.msdn.microsoft.com/Forums/en-US/parallelextensions/thread/de169ace-59fc-4ffe-95b2-28488f4d2245#8b284135-c254-42f6-b093-c9faf476e957Abhijeet Patelhttp://social.msdn.microsoft.com/Profile/en-US/?user=Abhijeet%20PatelHow Many Tasks does the Parallel.For spawn?Thanks. That helps.<br/>Sun, 28 Jun 2009 00:12:18 Z2009-06-28T00:12:18Z