reader-writer lock

Also known as: read lock, read-write lock, reader-writer locks, RwLock

A reader-writer lock allows many readers or one writer at a time. Acquiring it, even for reading, still updates shared state that threads contend on.

See the standard library documentation.