Challenge #8 Better Solution


last week I was hanging out with friends and like geek often do we was speaking about Rx . when it come to the solution for Challenge #8 ,Eric Rabinovitch suggest much better solution than I had. today I managed to have the time for putting Eric’s idea into code and I came out with shorter and more elegant solution.   before I post the solution I will put short reminder for the issue I’m about to solve. the challenge was all about buffering the data on suspension period and flush it out on resume. the...
no comments

Async Local


following the previous post about .NET 4.5 new Async API this post will focus on AsyncLocal API the subject of this post brought to my awareness while speaking with my  colleagues Yuval Detinis and Ido Flatow. AsyncLocal<T> solving the problem of maintaining call context for logical call rather than the thread context. while working with async / await or asynchronous API in general keeping the call context may become a problem. the thread context may not represent the logical call context. putting data on the thread local storage may be bad idea while working...
no comments

.NET 4.5 new Async API

the new .NET 4.6 and Visual Studio 2015 major features like Roslyn, RyuJIT  musk some other cool feature like async API additions. this post will put some light on a few basic API and will be followed by post about AsyncLocal<T>. .NET 4.6  was adding some convenient API: Code Snippet Task.CompletedTask; var cts = new CancellationTokenSource(100); Task.FromCanceled(cts.Token); Task.FromException(new TimeoutException()); those API may seem silly for newbies but developer which familiar with async code style may find this API’s very useful for abstracting the synchronous /  asynchronous boundaries and for reducing memory footprint for some async...
no comments