Exception.StackTraceEx – better exception stacktrace for async code

Last year I wrote about getting good exception stack traces for async code. Now I’ve cleaned it up, made into a Portable Class Library, published the source code it under MIT-license on github and made precompiled binaries available as a NuGet package.   To recap: the goal is to get a user-experience like this, including…

1

Mr Flakey — helps you write robust async code

(Update: Mr Flakey asked me to tell everyone that he’s now available as a NuGet package)   It’s a fact of life that network operations might fail. I wanted to check that my client apps behave correctly even if calls to REST services fail. So here’s what I do: Dim r = Await http.GetStringAsync(uri).Flakey() I wrote…

3

Apps vs Websites

On your phone/tablet, which do you prefer — apps or websites? Do you look up stuff more frequently in apps or in websites, in your regular daily use? Do you have 30 apps installed, or 30 websites bookmarked, or both? Do you have more apps that you use every day, or more websites that you…

1

Async re-entrancy, and the patterns to deal with it

What should we do in case of re-entrancy? For example, if the user clicks the button twice in rapid succession then this code will give this the wrong answer: async  void  ButtonClick( object  s,  EventArgs  e) {      await  FooAsync(); }  async  Task  FooAsync() {    var  x = ReadEntry();    await  Task .Delay(100);    WriteEntry(x + 1); }   There are several patterns to…

7