Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Documentation is one of the most powerful (and, sadly, most underutilized) tools for managing thread safety. Users look to the documentation to find out if a class is thread-safe, and maintainers look to the documentation to understand the implementation strategy so they can maintain it without inadvertently compromising safety. Unfortunately, both of these constituencies usually find less information in the documentation than they’d like.
|
Document a class’s thread safety guarantees for its clients; document its synchronization policy for its maintainers. |