Timeline for std::lock_guard or std::scoped_lock?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 6, 2021 at 12:01 | comment | added | HAL9000 | If it's like this, why wasn't it marked as deprecated? | |
Dec 17, 2020 at 1:44 | comment | added | Kerrek SB |
@JoakimThorén: Thanks, that's a good point. I don't think this was considered during the design of scoped_lock , which started out as a proposal to extend lock_guard , but had to be renamed because of ABI breaking concerns. But that's a good insight.
|
|
Dec 15, 2020 at 8:50 | comment | added | Joakim Thorén |
Howard Hinnant's answer explains why scoped_lock is NOT a strictly superior version of lock_guard . The reason for keeping lock_guard is not solely due to compatibility!
|
|
Oct 31, 2018 at 4:39 | comment | added | Paul Childs | As it is c++17, compatibility is a particularly good reason for its existance. I also vehemently disagree with any absolutist claim of "you should only ever use" when the ink is still drying from this standard. | |
May 19, 2018 at 0:13 | comment | added | Shital Shah | scoped_lock is C++17 only | |
Apr 15, 2017 at 22:03 | audit | First posts | |||
Apr 16, 2017 at 0:57 | |||||
Apr 13, 2017 at 13:05 | audit | First posts | |||
Apr 13, 2017 at 13:48 | |||||
Apr 5, 2017 at 12:29 | audit | First posts | |||
Apr 5, 2017 at 12:43 | |||||
Mar 25, 2017 at 17:42 | comment | added | Kerrek SB |
@NicolBolas: That's true, but that also applies to lock_guard . But it certainly makes the guard classes a bit easier to use.
|
|
Mar 25, 2017 at 17:39 | comment | added | Nicol Bolas | Also, thanks to class template argument deduction, you don't even have to list out the lockable types. | |
Mar 25, 2017 at 17:31 | history | answered | Kerrek SB | CC BY-SA 3.0 |