Posts by this author

Mar 16, 2020
Post comments count20
Post likes count4

Async ValueTask Pooling in .NET 5

The async/await feature in C# has revolutionized how developers targeting .NET write asynchronous code. Sprinkle some and around, change some return types to be tasks, and badda bing badda boom, you've got an asynchronous implementation. In theory. In practice, obviously I've exaggerated the ease with which a codebase can be made fully asynchron...

.NET.NET CoreC#
Dec 11, 2019
Post comments count51
Post likes count59

ConfigureAwait FAQ

.NET added / to the languages and libraries over seven years ago. In that time, it's caught on like wildfire, not only across the .NET ecosystem, but also being replicated in a myriad of other languages and frameworks. It's also seen a ton of improvements in .NET, in terms of additional language constructs that utilize asynchrony, APIs offering asy...

.NET.NET CoreC#
Dec 11, 2019
Post comments count39
Post likes count23

An Introduction to System.Threading.Channels

"Producer/consumer" problems are everywhere, in all facets of our lives. A line cook at a fast food restaurant, slicing tomatoes that are handed off to another cook to assemble a burger, which is handed off to a register worker to fulfill your order, which you happily gobble down. Postal drivers delivering mail all along their routes, and you eithe...

.NET.NET CoreC#
May 15, 2019
Post comments count60
Post likes count1

Performance Improvements in .NET Core 3.0

Take a tour through some of the many improvements, big and small, that have gone into the .NET Core 3.0 runtime and core libraries to make apps and services leaner and faster.

.NET Core.NETC#
Nov 7, 2018
Post comments count23
Post likes count20

Understanding the Whys, Whats, and Whens of ValueTask

The .NET Framework 4 saw the introduction of the  namespace, and with it the  class. This type and the derived  have long since become a staple of .NET programming, key aspects of the asynchronous programming model introduced with C# 5 and its  /  keywords. In this post, I'll cover the newer / types, which were introduced to help improve asynchrono...

.NET
Apr 18, 2018
Post comments count3
Post likes count2

Performance Improvements in .NET Core 2.1

Back before .NET Core 2.0 shipped, I wrote a post highlighting various performance improvements in .NET Core 2.0 when compared with .NET Core 1.1 and the .NET Framework. As .NET Core 2.1 is in its final stages of being released, I thought it would be a good time to have some fun and take a tour through some of the myriad of performance improvements...

.NET
Jun 7, 2017
Post comments count4
Post likes count3

Performance Improvements in .NET Core

Update (2017/06/12): Added BenchmarkDotNet blog post link. There are many exciting aspects to .NET Core (open source, cross platform, x-copy deployable, etc.) that have been covered in posts on this blog before. To me, though, one of the most exciting aspects of .NET Core is performance. There's been a lot of discussion about the significant adv...

.NET
Feb 2, 2015
Post comments count0
Post likes count2

New Task APIs in .NET 4.6

There are several nice API-level enhancements to the Task Parallel Library in .NET 4.6, which you can grab a preview of as part of the Visual Studio 2015 CTP. Task.From* .NET 4.5 had a Task.FromResult method.  This method makes it quick and easy to manufacture a new Task for a known result value, and is particularly useful when implementing a Tas...

.NET Parallel Programming
Apr 4, 2013
Post comments count0
Post likes count1

.NET memory allocation profiling and Tasks

The .NET Framework blog published this morning a guest post from yours truly on .NET Memory Allocation Profiling with Visual Studio 2012.  As you're trying to improve the performance, throughput, and memory usage of code that uses Tasks, the described profiler in Visual Studio can be a valuable tool in your tool belt (of course, the example I ...

.NET Parallel Programming
Apr 3, 2013
Post comments count4
Post likes count1

Tasks, Monads, and LINQ

A few years back, Wes Dyer wrote a great post on monads, and more recently, Eric Lippert wrote a terrific blog series exploring monads and C#. In that series, Eric alluded to Task<TResult> several times, so I thought I’d share a few related thoughts on Task<TResult> and the async/await keywords.As both Wes and Eric highlight, a mo...

.NET Parallel Programming