From 7091892818f0cc1bd0156e4e6d04178fc39b9235 Mon Sep 17 00:00:00 2001 From: Marie Bremner Date: Mon, 26 Jun 2017 14:21:01 -0700 Subject: [PATCH] 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 --- folly/docs/Synchronized.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.34.1