Implementing Hazard Pointers in Rust (part 2)
source link: https://www.youtube.com/watch?v=_LK7qvBWNYo
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
We continue our journey implementing Hazard Pointers (https://erdani.org/publications/cuj-2...) in Rust. We follow along with the C++ implementation in Facebook's Folly library (https://github.com/facebook/folly/blo...), starting from where we left off last time: https://github.com/jonhoo/haphazard/t...
0:00:00 Introduction 0:01:50 Where we left off 0:05:50 PRs fixing problems from part 1 0:10:35 Update on issues we filed 0:20:37 Bugs I found 0:35:12 Can deleter alias be const? 0:38:35 impl Drop vs drop in vtable 0:40:25 Some Rust Q&A 0:43:20 Splitting up into modules 0:56:56 Support for custom domains 2:19:30 Improving static domain safety 2:58:04 Intermission 3:02:02 Aligning with Folly's HazPtrDomain 4:39:03 Aligning with Folly's HazPtrHolder 5:18:32 Aligning with Folly's HazPtrObject
5:25:10 Where we are and where next?
You can find the latest code for the implementation at https://github.com/jonhoo/haphazard.
Live version with chat: https://youtu.be/Hy8VfC2FwBM
Show lessShow more
18 Comments
On the commit messages, the general advice (from people who would know) is to consider 50 a soft limit (when you start getting a wagging finger from UIs) and 72 the harder limit (when you start getting truncated in github UI and breaking git log layout)
In general there doesn't seem to be any justification for word wrapping the body other than the lack of word wrapping (as opposed to character wrapping) in terminals, so 72 is a general formatting guideline there that leaves space for quoting in emails, but don't get weird and wrap stack traces or whatever.
Read more 1 week ago
On domain default, how do you feel about impl Default for &'static HazPtrDomain ?
And it sounds like Rustdoc should expand everything explicitly documented.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK