Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: `folly::Synchronized::operator->` is a footgun in three ways. * It's easy to accidentally acquire a lock in an inner loop. * It's easy to cause a deadlock. * It's easy to non-atomically update independent fields under a mutex with repeated uses of `->`. It's clear that our deprecation warnings here aren't sufficient. Uses of `operator->` are showing up in new code. To ease the migration and prevent new accidental uses, move the operators into an `ImplicitSynchronized` subclass. This work broken into three steps to ease landing incrementally: * Introduce the ImplicitSynchronized type. * codemod usage sites that need ImplicitSynchronized. * Move `operator->` from Synchronized to ImplicitSynchronized. Reviewed By: Gownta Differential Revision: D48277297 fbshipit-source-id: a4b51e494c5ca73f88b79392694a687030a2046a
- Loading branch information