TPL Dataflow Starvation

Saturday, April 19, 2014

TPL Dataflow Starvation this post is dealing with TPL Dataflow issue that may cause starvation.the TPL Dataflow team aware of it, so we can expect it to be fix in the near future.until then, you should be aware of it in order to avoid potential starvation of some of your Dataflow Blocks. so when does it happens? the starvation will happens when you have 2 blocks which is linked to the same source block and the first block linked block has limit Bound Capacity. usually you structure your blocks fabric this way, when you want a fallback...

Code Paste

Monday, March 31, 2014

Code Paste during the years I maintains code snippets as notes for myself.recently goes over it and thought it might be useful to some of you, so I decided to publish it on my blog. you can see my code snippet at http://codepaste.net/searchall you have to do is to fill the "By" filed with my name and click search. enjoy it
no comments

Observable.FromAsync is it the right choice?

Saturday, March 22, 2014

Observable.FromAsync is it the right choice? one of the most common RX's practice is to use Observable.FromAsync for executing asynchronous IO operations. typical code may look like: Code Snippet var webClient = new WebClient(); IObservable<string> uris = ...; var dataStream = from uri in uris                     from data in Observable.FromAsync(                         () => webClient.DownloadDataTaskAsync(uri))                     select data; behind the scenes RX set a Task continuation (ContinueWith) and propagate the result through AsyncSubject, actually it is a bit complex and messy implementation combination with TPL Dataflow (.NET 4.5) may offer better solution to asynchronous...

Code Samples for my SDP Sessions

Monday, December 23, 2013

Code Samples for my SDP Sessions the SDP conference was ended last week. with a few days delay the code sample for my sessions is now available. all the code for both days (TPL and Async Programming and Advanced Parallel Composition) available in here.   Enjoy :-)
no comments

Code Samples for my SDP Sessions

Code Samples for my SDP Sessions the SDP conference was ended last week. with a few days delay the code sample for my sessions is now available. all the code for both days (TPL and Async Programming and Advanced Parallel Composition) available in here.   Enjoy :-)
no comments

The 3rd day of the SDP

Wednesday, May 8, 2013

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...

Async / Await for .NET 4, Silverlight and Windows Phone

Tuesday, May 7, 2013

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.
no comments

Parallel and The C# Memory Model

Wednesday, March 6, 2013

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 = !b;                 }                 Console.WriteLine("Complete {0}", b);             });         Thread.Sleep(30);         _stop = false;     } } ...

Async and AggregateException

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. in this case the...