From: Marie Bremner Date: Mon, 26 Jun 2017 21:21:01 +0000 (-0700) Subject: Edited folly synchronized doc because one of the functions was incorrect X-Git-Tag: v2017.07.03.00~31 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7091892818f0cc1bd0156e4e6d04178fc39b9235;p=folly.git Edited folly synchronized doc because one of the functions was incorrect Summary: Edited the example function for withWLock Reviewed By: simpkins Differential Revision: D5322000 fbshipit-source-id: 6d95b173087dec33cfdc0d0cee9c605cdf4e2593 --- diff --git a/folly/docs/Synchronized.md b/folly/docs/Synchronized.md index fef6c78c..0e2ccc56 100644 --- a/folly/docs/Synchronized.md +++ b/folly/docs/Synchronized.md @@ -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);