Skip to content
0:00 / 0:00

#rust#mutex#std::sync::mutex

RustConf 2021 - Project Update: Libs Team by Mara Bos

Rust Programming Language

70K subscribers • 72 videos on Hallway • Conference channel

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Mara Bos, Rust Libs Team Lead

Intermediate. Assumes working knowledge.

19K views5 years ago1 recommendation

Programming languagesSystems programmingRustConcurrency and parallelismOperating systems

Mara Bos discusses how the Rust Libs team unblocks large efforts, using improvements to the standard library's locks as an example.

Project Update: Libs Team by Mara Bos A story about how things get stuck, and how to get things moving again. Taking improvements to the standard library's locks as an example, we'll take a look at how large efforts often get stuck, and explore what can be done in such situations. We'll look into breaking problems apart, how to narrow the scope of discussions, and finally at some organisational changes that might help a bit.

Why it's here

1 person recommends this

What people say. Recommended for explaining why POSIX mutexes in Rust's standard library historically required heap allocation.

u/Zeta0114942in r/rust • Recommends

On “Why is std::sync::Mutex 60-70x time slower than C++'s std::mutex?”

As I remember it from a great talk by Mara Bos, posix mutexes aren't allowed to be moved, so they are wrapped inside the a `Pin<Box<OsMutex>>`, which necessitates a heap allocation per mutex. To negate this difference i would recommend using `parking_lot` mutex or trying to compile cpp code in msvc, since on windows Mara just changed the doc to allow moves (see in the talk).