Skip to content
0:00 / 0:00

#rust#send#sync

Crust of Rust: Send, Sync, and their implementors

Jon Gjengset

111K subscribers • 38 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.

Advanced. Deep dive for people who know the field.

59K views4 years ago2 recommendations

Programming languagesSystems programmingRustConcurrency and parallelismMemory management

Jon Gjengset explains the Send and Sync marker traits in Rust, exploring how they ensure thread safety and how they are implemented.

This time we go over the Send and Sync marker traits from the standard library, as well as some of the most important implementors (and non-implementors) of them. You can find the nomicon entry for Send/Sync here: doc.rust-lang.org/nomicon/send-and-sync.html. Live version with chat: youtu.be/xmkSDM5omFA Why Send and Sync? What are Send and Sync? Marker traits Auto traits The Send trait Types that aren't Send Digging into Rc The Sync trait Send + !Sync Negative implementations Sending mutable references Raw pointers std::sync::mpsc and !Sync Placement of T: Send/Sync bounds Per-OS impl Send for guards more std::sync::mpsc and !Sync Is Send/Sync auto-implemented? The nomicon Send/Sync entry There's no magic! Negative impls on stable

Why it's here

2 people recommend this

What people say. Highly recommended as an excellent, deep-dive explanation of Rust's Send and Sync traits and thread safety.

u/realflakmin r/rust • Recommends

On “The docs say HashMap is Send + Sync-- how can that be?”

Maybe you will like video form of the answer? John Gjengset has recently published crust of rust episode concerning this topic link to this video needles to say it's awesome 😎

u/misha_hollywoodin r/rust • Recommends

On “Why does Arc require both Send and Sync, and not just Sync?”

There is good explanation of Send and Sync from John. He explains it just thru Rc link to this video