The die is cast. Your business- and infrastructure logic will need to move gradually to asynchronous code. Changing large code-bases to async/await seems like a monumental effort, and there might be dragons laying on the road. To avoid unnecessary resource waste, unforeseen concurrent access to shared resources or even deadlocks we must prepare our code bases for this paradigm shift.
In this workshop, you will learn the difference of CPU vs. IO-Bound, how to avoid hidden traps like async void or context capturing and how you integrate asynchronous code into the Task Parallel Library. Through a series of hands-on exercises and theory inputs, you’ll gradually build up the knowledge to develop a scalable and robust code that can unleash the full power of asynchronous I/O without sacrificing thread safety.
Topics:
– CPU vs. IO bound
– Threads, ThreadPool, and Tasks
– Async / Await and the best practices
– Task Parallel Library
– Combining async/await with the TPL as well as pitfalls
– ThreadStatic, ThreadLocal, AsyncLocal aka Ambient State vs. Floating State
– Concurrency Limitation
– Cooperative Cancellation
– Task Tracking
– Graceful shutdown
– Bonus (only if there is time):
– Value Tasks
– Custom Awaiters
– Custom Statemachine Builders
Hands-on Labs Requirements:
During this full-day workshop, you will have the opportunity to perform hands-on exercises.
To be able to follow those exercises, you will need your laptop with the following software installed:
Windows 7 or later
Visual Studio 2017 (Community Edition is fine) as well as a TestRunner (i.ex. VS TestRunner or Resharper)
.NET 4.6.1 or higher
We will provide power sources and WiFi connectivity, but we do not provide laptops, so please bring your own!