Browse by Tags
All Tags »
TPL (
RSS)
The 3rd day of the SDP was over and I want to thanks all the attendants. my yesterday session was about C# 5 async and await . today I will have a full day tutorial on Rx and TPL Dataflow . you can download the demo code and also the presentation for second and third days from here (the link is also having the demo code for today's sessions). anyway, I also want to recommend 2of yesterday session. if you were attend at the conference you should have an access to the sessions video page. first...
Async / Await for .NET 4, Silverlight and Windows Phone if you have to target .NET 4, Silverlight and Windows Phone and still want to use the async / await pattern. the BCL team provide you with a new NuGet package named Microsoft.Bcl.Async . this package was announced as stable a few week ago. so you can check it out if you're having VS 2012 but should target one of the above platforms. be aware that this package won't work with 2010.
Parallel and The C# Memory Model Parallel programming can be tricky , both compiler and CPU's optimization can lead into a twilight zone's debugging. lets take the following code snippet snippet: Code Snippet class Program { static void Main( string [] args) { Console .WriteLine( "Start" ); var u = new Util (); u.Exec(); Console .ReadKey(); } } public class Util { private bool _stop = true ; public void Exec() { Task t = Task .Run(() => { bool b = true ; while (_stop) { b = ...
Open House at Microsoft yesterday I was lecturing at Microsoft about VS 2012, .NET 4.5, async/await, Rx and TPL Dataflow. there was 90 people attended and I hope that everybody has learn something new. the code sample for this lecture available here .
Async and AggregateException this post is a complementary to Eran Stiller's post . I was reading Eran Stiller's post about exception handling using async methods and I want to add a few side notes. 1) the exception handling behavior decisions is well documented in this post (by the TPL team), it decided after they had consider different options. 2) I was suggesting that compiler will check whether the a catch of AggregateException is implemented and if so to avoid the unwrapping behavior...
Tpl Dataflow TOC Part 1 Part 2 : ITargetBlock Part 3 : ISourceBlock Part 4 : Block structure Part 5 : walkthrough
SDP 2012 - Day 2 the SDP 2012 conference has day 2 had completed. I was speaking about async / await , Rx and TPL Dataflow . you can find the materials for my lecture in here . I will give the same lecture on Wednesday next week, there is a chance that some place is still available, so if you are interesting, you can check it with Sela Marketing .
Intel® VTune™ Amplifier XE this post will review the Intel® VTune™ Amplifier XE for parallel applications. when performance is matter you should go thought the process of performance improvement cycle. the cycle may be a bit different but the measurement step cannot be omit. at the measurement step you may evaluate different aspect like duration, memory, contention, cache behavior, CPU and cores utilization. profilers is one of the method which you can evaluate those aspects. different profiler...
the march 2011 SDP conference has just come to end. and we want to thanks all attendants. the demo and samples about TPL, what’s new in TPL 4.5 , C# 5 Aysnc and await , Rx (Reactive Extension) and TPL Dataflow is available at this link .
Sela conferences (SDP) is coming near (25-29/3/2012). you can check the following link for all the SDP's tutorials and sessions http://www.sela.co.il/s/SDP2012/index.html . I will present 2 full-day tutorials (Yaniv Rodenski will join me on the first one). the first day Introduction to the Task Parallel Library is a full TPL 4 day which will give you a solid knowledge, HowTo and Consideration about building parallel application using the TPL library. at the end of this day we will...
Parallel.ForEach behavior this post is a direct continuation for the previous post about " Real-life story: Blocking Collection ". (Real-life story: Blocking Collection).ContinueWith (t => this post); or await (Real-life story: Blocking Collection); this post; my colleague Bram Veldhoen has suggest to demonstrate the behavior of the Parallel.ForEach thread's hunger in more pure fashion which doesn't include BlockingCollection<T> or any other high level Enumerable. the following...
Real-life story: Blocking Collection this post will discuss a real-life story which uncover none trivial (yet logical) behavior which related to Parallel.ForEach and BlockingCollection<T> . I will explain why it happens and what how can we handle it right. it all start when Guy Eden from ITG has found that the following code seem to leak memory : Code Snippet private static void Main() { var bc = new BlockingCollection < int >(); Task .Factory.StartNew(() => Parallel .ForEach(bc.GetConsumingEnumerable...
Tpl Dataflow walkthrough - Part 5 this post is a complete walkthrough of a web crawler sample that was build purely by using Tpl Dataflow . it was built on .NET 4.5 / C# 5 (on a virtual machine using VS 11 ). I will analyze each part of this sample, both by discussing the Dataflow blocks and the patterns in used. the sample code is available in here (it is a VS 11 project). during the walkthrough you will see the following Tpl Dataflow blocks: TransformBlock TransformManyBlock ActionBlock BroadcastBlock...
Rx - Aggregate vs. Scan this post will focus on 2 Rx operators Aggregate and Scan . both Aggregate and Scan are dealing with event stream accumulation , the only difference is that Aggregate produce single result (upon the stream completion) and Scan present an ongoing runtime accumulation which react for each OnNext . both operators has 2 overloads with the same signature: Code Snippet IObservable <TSource> Aggregate<TSource>( this IObservable <TSource> source, Func <TSource...
async / await, some reasoning this post will try to make some reasoning about the .NET 4.5 / C#5 await keyword. I will begin with a quiz. how long will it take to the following method to produce the 42 value? Code Snippet async Task < int > Execute() { await Task .Delay(1000); await Task .Delay(1000); return 42; } you should remember that conceptually the await keyword will translate to a continuation . the above code can be compare to the following TPL 4 code snippet: Code Snippet Task <...
More Posts
Next page »