Fix race in Notification Queue
authorGunjan Sharma <gunjan@fb.com>
Wed, 9 Jul 2014 17:56:05 +0000 (10:56 -0700)
committerTudor Bosman <tudorb@fb.com>
Wed, 9 Jul 2014 20:52:19 +0000 (13:52 -0700)
commited684e7693cf2ca054f19d9c2ab02e4e0acdf2b9
treea01585a7ad0ff0921ca230f42df50f2fcbbaab61
parentfca9fccb9676d9ac2d9b5c79dca8bd5ae42ad740
Fix race in Notification Queue

Summary: When we are changing value of numActiveConsumers_ with setActive from handlerReady at the SCOPE_EXIT we have a race with reading of the same variable in putMessageImpl.

Test Plan: Had a local race which works fine now.

Reviewed By: davejwatson@fb.com

Subscribers: trunkagent

FB internal diff: D1424674
folly/io/async/NotificationQueue.h