Fix TIMED_SYNCHRONIZED_CONST bug
authorLouis Kruger <louisk@fb.com>
Tue, 1 Apr 2014 20:22:42 +0000 (13:22 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 4 Apr 2014 02:54:15 +0000 (19:54 -0700)
commit7de41cd34151873c87d86353e596fbae2ebc74a8
tree5ce5fbdddcc2bc72fcaddf5d12442490c2c1ea89
parent30c26b8fbc31bcb51a3c903a84ee54fb7d03f2c9
Fix TIMED_SYNCHRONIZED_CONST bug

Summary:
TIMED_SYNCHRONIZED_CONST is acquiring a read-write lock but releasing a shared lock.  Chaos ensues.
@override-unit-failures

Test Plan: Add unit test, test times out before fix, passes after fix.

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1251518

Blame Revision: D327492
folly/Synchronized.h
folly/test/SynchronizedTest.cpp
folly/test/SynchronizedTestLib-inl.h
folly/test/SynchronizedTestLib.h