Chris Keeline and facebook-github-bot Fix dev-tsan error
96b3036 May 11, 2021
Fix dev-tsan error
Summary:
TSAN catches this as a data race, though it's fairly benign. In the
assert we read non-atomic `state` without holding the lock. As a fix, acquire
the lock in the assert. The assert is skipped anyway in opt builds.

Reviewed By: yfeldblum

Differential Revision: D28302491

fbshipit-source-id: b92ca9f3d321d34301d96e59fab363d999bddb30
96b3036