Skip to content
masterclass Buddy

Rust · Class

RwLock

Rust's RwLock lets many readers access a value together, or lets one writer access it alone. Lock guards release access when they are dropped.

Last updated

Since
1.0.0

Syntax

pub struct RwLock<T: ?Sized> { /* private fields */ }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Mutex
  • RwLockReadGuard
  • RwLockWriteGuard
  • PoisonError
  • LockResult
  • TryLockResult

Source: RwLock in std::sync::poison - Rust. Checked 2026-11-03.