Fix TLRefCount::useGlobal to work with TSAN
authorAndrii Grynenko <andrii@fb.com>
Tue, 11 Apr 2017 06:30:46 +0000 (23:30 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 11 Apr 2017 06:35:17 +0000 (23:35 -0700)
commit1d11ad7a0af6277ca6ed2ad147ac16a2e7ac3760
tree39abde07086566e2f32e2476638792d3d80e4c32
parent42f6e99cfd2780023c4684fb2f6aed101cf98bdb
Fix TLRefCount::useGlobal to work with TSAN

Summary: TSAN has a limitation for the number of locks held concurrently - https://github.com/llvm-mirror/compiler-rt/blob/master/lib/sanitizer_common/sanitizer_deadlock_detector.h#L126, so we have to work around that.

Reviewed By: yfeldblum

Differential Revision: D4866477

fbshipit-source-id: 958251e97d91c1c46ef4e907de2cf189fb04f88e
folly/experimental/TLRefCount.h