News for hackers. Stuff that matters.
Re:Abseil: C++ Common Libraries by 7197ghr918hf on Wednesday September 27, 2017 @11:08PM (#15354250)
To my eyes, this code is much less clear than code that uses absl mutexes. Also, to my understanding, reentrant mutexes are much slower than ordinary mutexes, and are never necessary.

But, I have been using absl mutexes for more than ten years, so I'm a bit biased.

Re:Abseil: C++ Common Libraries by duneroadrunner on Thursday September 28, 2017 @12:26AM (#15354597)
Yeah, I think it might be a familiarity bias.

Anyway, the point of access requesters are that they are much safer than manually protecting resources with mutexes. That is, using access requesters eliminates the possibility of data races[1]. Which is important because data races can be particularly insidious bugs.

Just like how smart pointers can improve safety by automatically managing object lifetimes, access requesters can improve safety by automatically managing object lifetimes and asynchronous access.

[1] As long as you adhere to the rule that shared objects not have "unprotected" mutable or indirect (i.e. pointers/references) members.