Svitla Smart Talk. C#: Locks are tricky


We’re often told that message passing is better than sharing memory and protecting it with critical sections. But, why? Can’t we just use a lock keyword and call it a day? What can go wrong?

In this talk, we’ll dive into concurrency primitives to understand how they work and what risks they bring. We’ll also crack the async magic, and finally, we’ll build a couple of custom primitives, for both non-async and async projects in C#. Get ready to see a full-blown display of plenty of interlocked operations, memory mapping, and observing how pieces flow between threads.


Adam Furmanek is a professional software engineer with over 10 years of experience under his belt. Currently working at Amazon with Big Data, Spark, and Machine Learning, Adam has always been interested in diving deep and exploring machine code, as well as understanding the internal details of the technology he uses every day. He enjoys debugging, decompiling, and disassembling code to understand memory models, concurrency problems, and other hidden details buried deep inside.



by Svitla Team
May 04, 2022