<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx</link><description>Related posts: What’s new in Beta 1 for the Task Parallel Library? (Part 1/3) What’s new in Beta 1 for the Task Parallel Library? (Part 2/3) So what else is new in TPL for Beta 1 (finally)? In the last post, we mentioned that TaskFactory offers more static</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Parallel Programming with .NET : What???s new in Beta 1 for the Task Parallel Library? (Part 2/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9549252</link><pubDate>Wed, 15 Apr 2009 00:37:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9549252</guid><dc:creator>Parallel Programming with .NET : What???s new in Beta 1 for the Task Parallel Library? (Part 2/3)</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/pfxteam/archive/2009/04/06/9534426.aspx"&gt;http://blogs.msdn.com/pfxteam/archive/2009/04/06/9534426.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Parallel Programming with .NET : What???s new in Beta 1 for the Task Parallel Library? (Part 1/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9549254</link><pubDate>Wed, 15 Apr 2009 00:37:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9549254</guid><dc:creator>Parallel Programming with .NET : What???s new in Beta 1 for the Task Parallel Library? (Part 1/3)</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/pfxteam/archive/2009/03/27/9514938.aspx"&gt;http://blogs.msdn.com/pfxteam/archive/2009/03/27/9514938.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9550391</link><pubDate>Wed, 15 Apr 2009 12:13:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9550391</guid><dc:creator>aL</dc:creator><description>&lt;p&gt;awsome stuff :) the ui scheduler and APM helpers will be a real production booster, as well as helping to reduce bugs :) &lt;/p&gt;
&lt;p&gt;i have a question though, &lt;/p&gt;
&lt;p&gt;is there any perticular reason why ContinueWhenAny/All takes a Task[] and not IEnumerable&amp;lt;Task&amp;gt;? (or maybe it does, its just that you used the ToArray method)&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9550405</link><pubDate>Wed, 15 Apr 2009 12:19:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9550405</guid><dc:creator>aL</dc:creator><description>&lt;p&gt;On a related note, ContinueWhenAny/All would make great extension methods for IEnumerable&amp;lt;Task&amp;gt; :) any chance of that happening? &lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9550580</link><pubDate>Wed, 15 Apr 2009 14:31:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9550580</guid><dc:creator>Michael Cederberg</dc:creator><description>&lt;p&gt;What is the algorithm for the default scheduler for creating new threads? Is it like the current .NET threadpool? Does it use the .NET threadpool?&lt;/p&gt;
&lt;p&gt;Any thoughts on scheduling tasks on IO completion port threads (like WCF does)?&lt;/p&gt;
&lt;p&gt;When replacing the default scheduler, how much of the underlying infrastructure is available (like local work stealing queues etc.)?&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9551518</link><pubDate>Thu, 16 Apr 2009 00:24:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9551518</guid><dc:creator>hyildiz</dc:creator><description>&lt;p&gt;Michael,&lt;/p&gt;
&lt;p&gt;Let me answer your questions in the order you asked:&lt;/p&gt;
&lt;p&gt; TPL and .Net ThreadPool are now tightly integrated (TPL tasks run on TP worker threads, the most significant difference being &amp;nbsp;how they can take advantage of the thread local work queues that enable work stealing). Given this, the policies for creating new threads for the default TPL task scheduler are exactly the same as the ThreadPool.&lt;/p&gt;
&lt;p&gt;Currently we don't support scheduling tasks on IO completion port threads. Although we do provide the new FromAsync API set for creating tasks to wrap asynchronous operations. I'm not sure about the scenario you have in mind, but you probably want to check out the FromAsync methods. I should also note that they indirectly take advantage of the IO threadpool under the hood.&lt;/p&gt;
&lt;p&gt;And about replacing the default scheduler. In summary the answer to your question is: No, none of the local workstealing queues structures are available for direct reuse in custom schedulers. But read on...&lt;/p&gt;
&lt;p&gt;When you implement a custom scheduler, you need to implement all major blocks about that scheduler's functionality. This includes work queue structures, mangement of worker threads, and the dispatch loop itself. &amp;nbsp;The reason we choose to go this way is because it enables a whole variety of application specific scheduling policies.&lt;/p&gt;
&lt;p&gt;That being said, the interface b/w TPL runtime and the custom scheduler is laid out in such a way that, if the scheduler implementer decides to provide a local workqueue &amp;amp; workstealing enabled scheduler, then the portions of TPL that can take better advantage of local queues will continue to do so with their custom scheduler. Actually I'm specifically referring to task inlining behavior, which is used in various TPL codepaths involving waits. This can be enabled by a custom scheduler if it provides a proper implementation for the TaskScheduler.TryExecuteTaskInline() override.&lt;/p&gt;
&lt;p&gt;Please let us know if you have further questions. Thanks.&lt;/p&gt;
&lt;p&gt;-Huseyin Yildiz&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9552883</link><pubDate>Thu, 16 Apr 2009 16:39:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9552883</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;A few additional points, on top of Huseyin's excellent response:&lt;/p&gt;
&lt;p&gt;- It is possible and relatively straightforward to implement a custom scheduler that schedules to the I/O ThreadPool, as WCF does. &amp;nbsp;Once the Beta is out, we'll make sure to release a sample that shows how to do this, in case its important for your needs.&lt;/p&gt;
&lt;p&gt;- We're also planning to release a sample that shows how to implement a work-stealing scheduler, in line with Huseyin's comments.&lt;/p&gt;
&lt;p&gt;aL, regarding your questions:&lt;/p&gt;
&lt;p&gt;- ContinueWhenAny/All are actually instance methods on the TaskFactory/TaskFactory&amp;lt;TResult&amp;gt; classes, so new, additional methods would be necessary to support them as extensions (which need to be static methods). &amp;nbsp;You'll of course be able to add these easily on your own if you need them, just creating extension methods that delegate, e.g.&lt;/p&gt;
&lt;p&gt;public static class MyExtensions&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public static Task ContinueWhenAll(this IEnumerable&amp;lt;Task&amp;gt; tasks, Action&amp;lt;Task[]&amp;gt; continuationAction)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return Task.Factory.ContinueWhenAll(tasks.ToArray(), continuationAction);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;- Regarding why these work with Task[] instead of IEnumerable&amp;lt;Task&amp;gt;, we went that route for consistency with existing APIs like WaitHandle.WaitAll. &amp;nbsp;Additionally, we wanted consistency between WaitAll and WaitAny, and for WaitAny (which provides the index of the completed item), one needs to be able to index into the original set. &amp;nbsp;From a usability perspective, do you value this kind of consistency? How important do you consider support for IEnumerable&amp;lt;Task&amp;gt; instead of Task[]?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9553179</link><pubDate>Thu, 16 Apr 2009 20:02:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9553179</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;i would like to suggest that you concentrate your efforts more on features instead of performance and extensibility.&lt;/p&gt;
&lt;p&gt;its nice that you can implement your own scheduler but who actually does that? there will probably be about 3-5 community driven and significant implementations of this. you dont need to provide a sample for that.&lt;/p&gt;
&lt;p&gt;also, acceptance and usage will be driven by features and usability, not by performance as long as it is in a close range below optimal. please use your time to make coders more productive instead of investing 50% more work to achieve 10% perf improvement.&lt;/p&gt;
&lt;p&gt;nevertheless i really enjoy using this library.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9553994</link><pubDate>Fri, 17 Apr 2009 11:43:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9553994</guid><dc:creator>Michael Cederberg</dc:creator><description>&lt;p&gt;The scenario for scheduling tasks on IOCP threads are:&lt;/p&gt;
&lt;p&gt;We have a highly parallel server application than continuously have about 1000 tasks scheduled. We try keep CPU load at 100% (we have some heavy calculations that we would like to run continuously).&lt;/p&gt;
&lt;p&gt;We currently have a very simple framework where we schedule tasks on IOCP threads (we plan to switch to TPL when it is released). When using the .NET ThreadPool we very easily end up with 1000 threads after running for some time (due to the .NET ThreadPool adding threads whenever there are queued workitems). &lt;/p&gt;
&lt;p&gt;When using regular threads we can remedy the problem a bit, but we still end up having either way too many threads (utilizing too many resources and getting a lot of context switches) or too few threads (prune to deadlocks and less than optimal utilization of all CPUs whenever a task is waiting).&lt;/p&gt;
&lt;p&gt;Scheduling tasks on IOCP threads provides better throughput in our scenario and is less prone to deadlocks than scheduling on regular threads (due to have way more IOCP threads ready for scheduling).&lt;/p&gt;
&lt;p&gt;On a somewhat related note, now that you embrace the Asynchronous Programming Model, do you have any plans for asynchronous synchronization primitives (e.g. an asynchronous monitor or readerwriterlock)?&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9554234</link><pubDate>Fri, 17 Apr 2009 16:41:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9554234</guid><dc:creator>aL</dc:creator><description>&lt;p&gt;hello, thanks for the reply :) &lt;/p&gt;
&lt;p&gt;i dont have any perticular scenario where i have to have IEnumerable&amp;lt;Task&amp;gt; and not Task[] but i generally prefer ienumerable since it lazy :) &lt;/p&gt;
&lt;p&gt;i do like consistency but if i'd rather have the exsisting apis also taking IEnumerables :) &lt;/p&gt;
&lt;p&gt;however maybe it doesnt really matter that the arguments for ContinueWhenAny/All cant be lazily evaluated and there might be other side effects of this that i havent thought of :)&lt;/p&gt;
&lt;p&gt;my main bother is that i have to write ToArray more, if they took ienumerables passing in Task[] would work anyway so from a callers prespective it would still be sort of consistent :) &lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9554498</link><pubDate>Fri, 17 Apr 2009 21:37:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9554498</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;what about taking middle ground in the debate about enumerables and Task[]. you said that you need to index into the collection that is passed in. so why dont you use IList&amp;lt;Task&amp;gt;? ie&amp;lt;Task&amp;gt; would always require you to internally call toList wasting cpu cycles.&lt;/p&gt;
&lt;p&gt;i also doubt that i will ever see an ie&amp;lt;Task&amp;gt; that is supposed to be evaluated lazily. evaluation of an ie&amp;lt;T&amp;gt; is conceptually side-effect free like property getters are conceptually read-only operations. materializing tasks however is not side-effect free thereby violating intuition. also, the lazy evaluation immediately breaks down because the Wait-method has to evaluate the ie&amp;lt;Task&amp;gt; internally.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9554506</link><pubDate>Fri, 17 Apr 2009 21:48:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9554506</guid><dc:creator>tobi</dc:creator><description>&lt;p&gt;also i'd like to hear a statement about scheduling io-heavy workloads or webservice-calls. the degree of parallelism is only weakly correlated with the number of cpu cores in this case. so the cpu-based scheduling will under or over utilize this resources. being able to specify the exact degree of parallelism conveniently will help a lot here.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9555110</link><pubDate>Sat, 18 Apr 2009 19:59:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9555110</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Michael, thanks for the extra information. &amp;nbsp;Regarding asynchronous locks (I'm assuming you mean something like &lt;a rel="nofollow" target="_new" href="http://msdn.microsoft.com/en-us/library/microsoft.ccr.core.interleave.aspx"&gt;http://msdn.microsoft.com/en-us/library/microsoft.ccr.core.interleave.aspx&lt;/a&gt;), it's definitely something we're investigating for the future, but we don't currently have plans to ship anything like that in .NET 4.&lt;/p&gt;
&lt;p&gt;aL, thanks for the follow-ups on IEnumerable&amp;lt;Task&amp;gt;. &amp;nbsp;We'll take a hard look at this and see if it's something that should be revamped.&lt;/p&gt;
&lt;p&gt;tobi, thanks for the IList&amp;lt;Task&amp;gt; suggestion. &amp;nbsp;Regarding always calling ToList internally, in effect we have to do that anyway, even if we're provided with an array. As we're dealing with concurrency, and as we need to work on the provided data concurrently with the thread that provided it to us, we need to make a defensive copy of the array/list/enumerable so that we can party on it without fear that after the call to us the code that called us will change the array. &amp;nbsp;This enables that calling thread to reuse the array safely, without having to worry about additional lifetime and concurrency safety issues (at the expense, of course, of an allocation and copy).&lt;/p&gt;
&lt;p&gt;Regarding your question around CPU vs I/O workloads, this is one of the reasons we've integrated so tightly with the .NET ThreadPool. &amp;nbsp;The CLR team will be talking more about the work that's been done here for 4.0, but the ThreadPool has been augmented with new thread injection/retirement heuristics meant to very quickly ramp up to the optimal number of threads to maximize work item throughput. &amp;nbsp;The limitation for this maximum is largely irrelevant to the ThreadPool, whether it's the number of CPUs or the bandwith of the network connection or disk throughput, etc. &amp;nbsp;If you do want to place minimums and maximums, you can still use ThreadPool.SetMin/MaxThreads. &amp;nbsp;And with the ability to write custom TaskSchedulers, you can also completely customize the scheduling logic to your hearts content. &amp;nbsp;Your scheduler could use your own threads managed explicitly by your code, it could be built on top of the worker thread pool (simply layering additional logic on top of delegations to QueueUserWorkItem), it could be built on the I/O thread pool, etc.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9555124</link><pubDate>Sat, 18 Apr 2009 20:28:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9555124</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Also, tobi, thanks for your suggestions on priorities, and I'm glad you enjoy using the library; I hope that when the Beta comes out, you're excited about the features it offers. &amp;nbsp;Please let us know at that point if there's something specific and high-value to you that you see it missing.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9555272</link><pubDate>Sun, 19 Apr 2009 02:20:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9555272</guid><dc:creator>aL</dc:creator><description>&lt;p&gt;glad to provide food for thought :) im by no means an expert though so i might be totaly wrong..&lt;/p&gt;
&lt;p&gt;one way to get around indexing might by to have WaitAny provide the actual task and not the index :) but perhaps a change like that would break alot of exsisting code&lt;/p&gt;
&lt;p&gt;lazy eval might not be the best thing (again, im no expert) but it would seem you'd be able to save allocations in wait/continueWhenAny if lets say the first task out of 1000 immedietly finishes, they you wouldnt even need to instansiate the other 999 :)&lt;/p&gt;
&lt;p&gt;also, i've heard that ie&amp;lt;T&amp;gt; promotes shorter object lifetimes and that that is beneficial for garbage collection. i might be wrong about that though&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9576104</link><pubDate>Wed, 29 Apr 2009 20:18:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576104</guid><dc:creator>Tamer</dc:creator><description>&lt;p&gt;Is there a timeline for the release of Beta1? (either for TPL or .net 4.0) ?&lt;/p&gt;
</description></item><item><title>What’s new in Beta 1 for Parallel LINQ (PLINQ)?</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9576294</link><pubDate>Wed, 29 Apr 2009 21:56:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576294</guid><dc:creator>Parallel Programming with .NET</dc:creator><description>&lt;p&gt;A number of improvements have been made to Parallel Extensions since the Visual Studio 2010 CTP across&lt;/p&gt;
</description></item><item><title>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9576380</link><pubDate>Wed, 29 Apr 2009 22:52:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576380</guid><dc:creator>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq-2/"&gt;http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq-2/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9576384</link><pubDate>Wed, 29 Apr 2009 22:52:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576384</guid><dc:creator>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq-4/"&gt;http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq-4/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9576778</link><pubDate>Thu, 30 Apr 2009 01:30:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9576778</guid><dc:creator>dashih</dc:creator><description>&lt;p&gt;Tamer, we cannot make any statements about the Beta 1 schedule at this time. &amp;nbsp;Very sorry!&lt;/p&gt;
&lt;p&gt;aL, we considered returning the actual Task instead of an index from WaitAny. &amp;nbsp;However, that would make the following scenario more difficult. &amp;nbsp;Let's say that you wanted to manipulate an array of Tasks after passing it to WaitAny - maybe remove the Task that WaitAny returned. &amp;nbsp;If the actual Task was returned, you'd have to walk the array searching for that Task. &amp;nbsp;With an index, you could access it immediately.&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9581508</link><pubDate>Fri, 01 May 2009 02:28:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9581508</guid><dc:creator>aL</dc:creator><description>&lt;p&gt;true.. :) but that seems like a slightly odd thing to do, you cant even remove stuff from arrays anyways, you could only set it to null or something.. it seems more likely that you'd be interested in the result of the task that finished (if you're interested in the task at all) and then you'd have to dereference the array to get it.. not to mention that you have to have accress (scope wise) to the original array, something that would promote shared state..&lt;/p&gt;
&lt;p&gt;i still think lazy would be the better way to go, esp. considering cancelation :) it seems you would materialize alot more tasks that you dont have to materialize when you have arrays beeing passed around :) &lt;/p&gt;
&lt;p&gt;i cant wait to until the beta comes out and the stuff you're doing are really awsome :) but from my point of view the arrays seem like a mistake :) &lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9582629</link><pubDate>Fri, 01 May 2009 20:01:54 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9582629</guid><dc:creator>Tamer Yousef</dc:creator><description>&lt;p&gt;got a question, is there a way to know when a task started? I'm looking for somthing like:&lt;/p&gt;
&lt;p&gt;Task.StartedAt as dateTime&lt;/p&gt;
&lt;p&gt;Task.FinishedAt as dateTime&lt;/p&gt;
&lt;p&gt;it will really help to collect some performance information about tasks. right now I collect the task finished datetime with the use of ContinueWith, but I'm not sure how to get the started dateTime, it would be nice if it's part of the Task class itself.&lt;/p&gt;
&lt;p&gt;thanks!&lt;/p&gt;
&lt;p&gt;-Tamer&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9582771</link><pubDate>Fri, 01 May 2009 21:57:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9582771</guid><dc:creator>Tamer Yousef</dc:creator><description>&lt;p&gt;the way I'm doing it now is by setting the start and finished datetime from inside the task (inside the delegate) and I'm saving references to all delegates in an array that have the same index as the task array, then I iterate throught the two arrays to grab the task status and the delegate information. &lt;/p&gt;
&lt;p&gt;It's not the best way to do it but the only way I'm aware of.&lt;/p&gt;
&lt;p&gt;-Tamer&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9583273</link><pubDate>Sat, 02 May 2009 05:08:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9583273</guid><dc:creator>toub</dc:creator><description>&lt;p&gt;Hi Tamer-&lt;/p&gt;
&lt;p&gt;It's not something we do automatically. &amp;nbsp;While it could be useful for certain niche situations, there's a non-negligable cost to accessing timing information, and it's not something we're keen to incur, especially since most scenarios don't need this information.&lt;/p&gt;
&lt;p&gt;If your goal is to time the actual body of the task, your best bet is to embed the start and stop calculation into the body of the task, using System.Diagnostics.Stopwatch or something similar. &amp;nbsp;If you use a continuation to track the end, you'll also be measuring the overhead in TPL for completing one task and running the following continuation. &amp;nbsp;Similarly, if you start the stopwatch prior to creating and starting the task, you'll be measuring the overhead associated with those operations and not just the body.&lt;/p&gt;
</description></item><item><title>Any plans to integrate with .Net 3.5 Async Sockets?</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9592755</link><pubDate>Thu, 07 May 2009 07:11:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9592755</guid><dc:creator>Sam Leitch</dc:creator><description>&lt;p&gt;.Net 3.5 introduced a new method of interacting with Sockets asynchronously, which improved the performance over its begin/end counterpart. Are there any plans to integrate that into the TPL similar to the FromAsync method?&lt;/p&gt;
&lt;p&gt;I actually like the async event object model better than the begin/end model and would love to see it used more.&lt;/p&gt;
</description></item><item><title>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9594747</link><pubDate>Thu, 07 May 2009 22:55:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9594747</guid><dc:creator>What???s new in Beta 1 for Parallel LINQ (PLINQ)? | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq/"&gt;http://www.codedstyle.com/what%e2%80%99s-new-in-beta-1-for-parallel-linq-plinq/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9617834</link><pubDate>Fri, 15 May 2009 09:14:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9617834</guid><dc:creator>Joe</dc:creator><description>&lt;p&gt;You say that the ContinueWith method on Task enables a slew of powerful patterns. Can you give a quick overview of these patterns?&lt;/p&gt;
</description></item><item><title>Parallel Tasks � new VS2010 debugger window</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9618223</link><pubDate>Fri, 15 May 2009 13:05:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9618223</guid><dc:creator>Daniel Moth</dc:creator><description>&lt;p&gt;Parallel Tasks � new Visual Studio 2010 debugger window&lt;/p&gt;
</description></item><item><title>MSDN Flash Podcast Pilot Show 2 for May 6th 2009</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9625650</link><pubDate>Mon, 18 May 2009 20:56:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625650</guid><dc:creator>IUpdateable from Eric Nelson</dc:creator><description>&lt;p&gt;This is the second pilot podcast to accompany the fortnightly MSDN Flash newsletter (Check out Pilot&lt;/p&gt;
</description></item><item><title>MSDN Flash Podcast Pilot Show 2 for May 6th 2009</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9625754</link><pubDate>Mon, 18 May 2009 22:00:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9625754</guid><dc:creator>Testing Blog Loc - Japanese</dc:creator><description>&lt;p&gt;This is the second pilot podcast to accompany the fortnightly MSDN Flash newsletter (Check out Pilot&lt;/p&gt;
</description></item><item><title>.NET 4 Beta 1 is now available, with parallelism!</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9632995</link><pubDate>Thu, 21 May 2009 01:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9632995</guid><dc:creator>Parallel Programming with .NET</dc:creator><description>&lt;p&gt;We’re very excited that the .NET Framework 4 Beta is now available for public download, as .NET 4 has&lt;/p&gt;
</description></item><item><title>.NET 4 Beta 1 is now available, with parallelism! | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9633063</link><pubDate>Thu, 21 May 2009 02:46:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9633063</guid><dc:creator>.NET 4 Beta 1 is now available, with parallelism! | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/net-4-beta-1-is-now-available-with-parallelism/"&gt;http://www.codedstyle.com/net-4-beta-1-is-now-available-with-parallelism/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Visual Studio 2010 Beta 1 est disponible pour tous !!!</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9633608</link><pubDate>Thu, 21 May 2009 13:21:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9633608</guid><dc:creator>Développement parallèle</dc:creator><description>&lt;p&gt;Mots cl&amp;#233;s Technorati : Visual Studio 2010 , PFX , Concurrency Runtime , TPL , PLINQ , Exemples , Documentation&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9634560</link><pubDate>Fri, 22 May 2009 03:56:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9634560</guid><dc:creator>dashih</dc:creator><description>&lt;p&gt;Joe,&lt;/p&gt;
&lt;p&gt;Re: overview of ContinueWith patterns&lt;/p&gt;
&lt;p&gt;We'll be posting something about this in the near future.&lt;/p&gt;
&lt;p&gt;Thanks for your interest!&lt;/p&gt;
</description></item><item><title>MSDN Flash Podcast Pilot Show 2 for May 6th 2009 | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9637679</link><pubDate>Sat, 23 May 2009 20:40:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9637679</guid><dc:creator>MSDN Flash Podcast Pilot Show 2 for May 6th 2009 | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/msdn-flash-podcast-pilot-show-2-for-may-6th-2009/"&gt;http://www.codedstyle.com/msdn-flash-podcast-pilot-show-2-for-may-6th-2009/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>.NET 4 Beta 1 is now available, with parallelism! | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9642656</link><pubDate>Wed, 27 May 2009 02:22:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9642656</guid><dc:creator>.NET 4 Beta 1 is now available, with parallelism! | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/net-4-beta-1-is-now-available-with-parallelism-2/"&gt;http://www.codedstyle.com/net-4-beta-1-is-now-available-with-parallelism-2/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>Visual Studio 2010 Beta 1 est disponible pour tous !!! | Coded Style</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9642804</link><pubDate>Wed, 27 May 2009 02:59:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9642804</guid><dc:creator>Visual Studio 2010 Beta 1 est disponible pour tous !!! | Coded Style</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.codedstyle.com/visual-studio-2010-beta-1-est-disponible-pour-tous-2/"&gt;http://www.codedstyle.com/visual-studio-2010-beta-1-est-disponible-pour-tous-2/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Parallel Programming with NET What s new in Beta 1 for the Task | Cellulite Creams</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9712525</link><pubDate>Tue, 09 Jun 2009 06:17:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9712525</guid><dc:creator> Parallel Programming with NET What s new in Beta 1 for the Task | Cellulite Creams</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://cellulitecreamsite.info/story.php?id=4277"&gt;http://cellulitecreamsite.info/story.php?id=4277&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: What’s new in Beta 1 for the Task Parallel Library? (Part 3/3)</title><link>http://blogs.msdn.com/pfxteam/archive/2009/04/14/9549246.aspx#9753303</link><pubDate>Mon, 15 Jun 2009 17:09:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9753303</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;As a follow up to the Task[] params, &amp;nbsp;After a bit of use I find that I *always* have something that implements IEnumerable&amp;lt;Task&amp;gt; and have *never* had an array, so I end up calling toarray every time. &amp;nbsp;While this isn't a huge problem, my code would be cleaner if there were a way to pass IEnumerable&amp;lt;Task&amp;gt; or IList&amp;lt;Task&amp;gt; directly - IList&amp;lt;Task&amp;gt; covers almost all of the scenarios as well.&lt;/p&gt;
</description></item></channel></rss>