Fix incorrect usages of folly::Synchronized
authorSarang Masti <mssarang@fb.com>
Tue, 28 Nov 2017 23:51:10 +0000 (15:51 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 29 Nov 2017 00:05:46 +0000 (16:05 -0800)
commitecb501b7f5c77cf3aff3603b22040824ae766b75
tree6638417e06567358d436720b6ec523954ab8c430
parentd017a3ffa0acf3389a1ee585a035c01cd9e51d07
Fix incorrect usages of folly::Synchronized

Summary:
We need to keep LockedPtr returned by rlock/wlock alive for the entire duration
of the loop. Else we are working on a snapshot of the data structure, which
might not be what we want.

Reviewed By: aary, ot, luciang

Differential Revision: D6426613

fbshipit-source-id: 294c0a7b9d756f3116d5cdb3a7b3678f693e0754
folly/io/async/EventBaseLocal.cpp