Edited folly synchronized doc because one of the functions was incorrect
authorMarie Bremner <marwhal@fb.com>
Mon, 26 Jun 2017 21:21:01 +0000 (14:21 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 26 Jun 2017 21:23:34 +0000 (14:23 -0700)
Summary: Edited the example function for withWLock

Reviewed By: simpkins

Differential Revision: D5322000

fbshipit-source-id: 6d95b173087dec33cfdc0d0cee9c605cdf4e2593

folly/docs/Synchronized.md

index fef6c78c78d0bc4bb83600251dafcca5f9368892..0e2ccc563aab649cc33f899397e5109287299421 100644 (file)
@@ -128,7 +128,7 @@ critical sections:
     void RequestHandler::processRequest(const Request& request) {
       stop_watch<> watch;
       checkRequestValidity(request);
-      requestQueue_.withWLock([](auto& queue) {
+      requestQueue_.withWLock([&](auto& queue) {
         // withWLock() automatically holds the lock for the
         // duration of this lambda function
         queue.push_back(request);