An Adventure in Race Conditions

By Felix Petriconi

Chip speeds are not increasing, but the number of cores is, so the path to better performance is concurrency. But writing concurrent code is hard.

In this introduction to asynchronous programming, I’ll give you an outlook on high-level abstractions that will help you avoid the most common traps associated with locks and atomics.

I’ll use a series of code examples from our production to illustrate just how subtle race conditions can be. I’ll also share strategies that find these problems and better, avoid them in the first place and show that using high-level abstractions don’t result in performance loss.

The talk will cover the following topics:

  • Basic principles of code sharing in concurrent code

  • Mutability, mutex and locks

  • Atomics

  • Condition variables

  • Race conditions

  • Futures

Your Privacy

By clicking "Accept All Cookies" you agree ACCU can store cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

By clicking "Share IP Address" you agree ACCU can forward your IP address to third-party sites to enhance the information presented on the site, and that these sites may store cookies on your device.