RESOLVED FIXED206443
[bmalloc] Define alias for std::unique_lock and std::lock_guard for better readability
https://bugs.webkit.org/show_bug.cgi?id=206443
Summary [bmalloc] Define alias for std::unique_lock and std::lock_guard for better re...
Basuke Suzuki
Reported 2020-01-17 14:07:52 PST
std::unique_lock and std::lock_guard are long name and a bit harder to distinguish them each other. Define simple type name for them.
Attachments
PATCH (71.34 KB, patch)
2020-01-17 14:14 PST, Basuke Suzuki
ysuzuki: review-
PATCH (72.43 KB, patch)
2020-01-17 15:27 PST, Basuke Suzuki
no flags
Basuke Suzuki
Comment 1 2020-01-17 14:14:33 PST
Yusuke Suzuki
Comment 2 2020-01-17 14:50:07 PST
Comment on attachment 388089 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=388089&action=review Loks good overall. > Source/bmalloc/bmalloc/Mutex.h:41 > +using SimpleLock = std::lock_guard<Mutex>; Rename it to UniqueLockHolder and LockHolder. The name “Lock” means the lock itself instead of RAII styled locking class. And consider using scoped_lock instead of lock_guard. Maybe we can use it now? (C++17)
Basuke Suzuki
Comment 3 2020-01-17 15:27:41 PST
Basuke Suzuki
Comment 4 2020-01-17 15:32:35 PST
A bug for scoped_lock was filed. https://bugs.webkit.org/show_bug.cgi?id=206451
Yusuke Suzuki
Comment 5 2020-01-17 15:42:01 PST
Comment on attachment 388096 [details] PATCH r=me
Basuke Suzuki
Comment 6 2020-01-17 16:39:34 PST
Thanks!
WebKit Commit Bot
Comment 7 2020-01-17 16:43:05 PST
Comment on attachment 388096 [details] PATCH Clearing flags on attachment: 388096 Committed r254781: <https://trac.webkit.org/changeset/254781>
WebKit Commit Bot
Comment 8 2020-01-17 16:43:07 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 9 2020-01-17 16:44:19 PST
Note You need to log in before you can comment on or make changes to this bug.