Browse by Tags
All Tags »
async »
Parallel (
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...
EF 6: Async this post is the first in a series about what's new in EF 6 . great improvements are about to come with Entity Framework 6 . it is a major release and the first one since EF become an open source. each post in the series will be dedicate to a single feature. this post will focus on a new EF a-sync features. the first question that should be asked is, why do we need parallel data access ? moreover why do we need a dedicate parallel data access API , rather then using the TPL Task.Run...
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...
Async - Handling multiple Exceptions the SDP conference was ended a few week ago and I finally find a time to write some comments. It was a very successful conference, the feedback and evaluations, of most sessions scored higher than 4.5, some well-over it. For example, one workshop had a perfect 5 / 5 score , and two other workshops scored 4.92 / 5 and 4.9 / 5. The highest score for a breakout session was 9.39 / 10, which is the highest score we’ve seen to date. my score was 4.90 / 5 . but this...
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 .
SDP 2012 - Day 1 the SDP 2012 conference has started today. I was speaking about what's new in .NET 4.5 parallelism . you can find the materials for my lecture in here . tomorrow I'm giving a full day tutorial about async / await, Rx and TPL Dataflow .
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...
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 <...
Using async / await this post will discuss parallel disposal. whenever we want to dispose a parallel execution upon completion we can't use the convenient using keyword. for example, the following code may be dispose the command before completion: Very bad Code Snippet using ( var conn = new SqlConnection (CONN_STR)) using ( var cmd = new SqlCommand ( "Select * from Employee" , conn)) { conn.Open(); cmd.BeginExecuteReader(ar => { int affected = cmd.EndExecuteNonQuery(ar); }); } the...
async \ await and Exception Handling this post will discuss how async / await is handling exceptions . as we mention in previous post , about the async / await concept, await is all about continuation . before .NET 4.5 parallel execution exceptions has to be handle in separate of the synchronic handling. for example: handling ThreadPool execution: Code Snippet void Foo() { try { Console .WriteLine( "Synchronic" ); ThreadPool .QueueUserWorkItem(state => { try { Console .WriteLine( "Parallel"...
the concept of async \ await in this post I will survey the new .NET 4.5 / C# 5 concept of async / await. I will focus on how to understand what is really happens behind the new async / await syntax. What's it all about? the new async / await syntax is using the C# syntactic compiler to generate async operation from code that is looking very much like a synchronous code. but before we start we should discus the new C# 5 syntax. the syntax include 2 keywords: async - which is only a marker...
Is it faster? does the .NET 4.5 really run faster than 4? this post will summaries TPL Performance Improvements in . NET 4.5 . the TPL team has put lot of effort to dramatically improve the overall performance of .NET 4.5. the improvement was achieve both by execution and memory allocation optimization. in result .NET 4.5 parallelism is faster and more GC friendly . allocation optimization does improve the overall execution speedup, because GC collection does have significantly impact on the overall...
More Posts
Next page »