Skip to content

Use absl thread annotations #2571

@htuch

Description

@htuch

In various places we have locks and lock-protected variables, we should use https://github.com/abseil/abseil-cpp/blob/master/absl/base/thread_annotations.h to provide hints to the compiler and sanitizers for GUARDED_BY etc.

There's some investigation to be done to find a solution that works cleanly on Clang OS X, see #2527 for example. Otherwise, it mostly works today and we can use these annotations once OS X is resolved.

We should switch the style guide to require them for new code, and then add missing annotations to existing code once this is in place.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions