Attending this event?
View analytic
Thursday, September 27 • 14:00 - 15:00
What do you mean "thread-safe"?

Sign up or log in to save this to your schedule and see who's attending!

How can we communicate with other developers about the safety of our C++ code against the hazards of concurrency? Terms like "thread-safe" don't always have a clear meaning, and more precise terms like "data race" and "race condition" often operate at the wrong level of abstraction. In order to communicate effectively about these issues, we need straightforward ways to talk about the safety requirements that APIs impose, and what goes wrong if you violate them.

In this talk, I will present the simple yet precise vocabulary we use for talking about these issues at Google: an "API race" happens when two operations access the same object concurrently, in violation of its contract. For most C++ types, that contract can be classified as "thread-safe" or "thread-compatible" depending on what combinations of operations can cause an API race (the remainder are called "thread-unsafe"), and that two-word classification usually tells you everything you need to know to avoid API races on the object. This is significant because if you can avoid API races, you can avoid not only all data races but also many race conditions.


Geoffrey Romer

C++ Library Team, Google
I've been involved in C++ standardization for a couple of years. I've written a few papers, particularly on improvements to std::function, and I have another on the way about making it easier for people to hash their types. | | I'm a member of the C++ Library Team at Google, which... Read More →

Thursday September 27, 2018 14:00 - 15:00

Attendees (59)