(wangle) fix a race condition in Core::maybeCallback
authorHans Fugal <fugalh@fb.com>
Wed, 5 Nov 2014 23:44:06 +0000 (15:44 -0800)
committerPavlo Kushnir <pavlo@fb.com>
Sat, 8 Nov 2014 02:38:49 +0000 (18:38 -0800)
commitc4035d0669465fa9e7ecb20f71633f71903fdeb7
tree72b9c1bd5897561fff2bf37f47028d2664c6b13f
parent35654c7b2138b590cdc18898a9897b665d8a443e
(wangle) fix a race condition in Core::maybeCallback

Summary:
`calledBack_` could be seen as true by both threads in this conditional. Classic rookie mistake. :-/

Test Plan: run unit tests

Reviewed By: darshan@fb.com

Subscribers: trunkagent, hannesr, net-systems@, fugalh, exa, njormrod, folly-diffs@

FB internal diff: D1661199

Tasks: 55429385506504

Signature: t1:1661199:1415215840:fb69f56c8cf6f59beeca809724ce015b5260d9ad

Blame Revision: D1636487
folly/wangle/detail/Core.h
folly/wangle/test/FutureTest.cpp