News for hackers. Stuff that matters.
Re:In the C++ bag of tricks: scoped locks by zeroonetwothree on Friday February 07, 2014 @04:57PM (#7199036)
folly::Synchronized implements this in a correct way (and also prevents access without acquiring the lock):

SYNCHRONIZED(data) { // modify data }

https://github.com/facebook/folly/blob/master/folly/Synchron...

There are no comments on this comment yet.