class

Syn::RWLock

Inherits Reference / Object

A many readers, mutually exclusive writer lock.

Allows readers to run concurrently but ensures that they will never run concurrently to a writer. Writers are mutually exclusive to both readers and writers.

Constructors

new(type : Core::Mutex::Type = :checked)
Source

Instance methods

lock_read(timeout : Time::Span) : Bool

EXPERIMENTAL The timeout feature is experimental.

Source
lock_read
Source
lock_read(timeout : Time::Span, &) : Bool

EXPERIMENTAL The timeout feature is experimental.

Source
lock_read
Source
lock_write(timeout : Time::Span) : Bool

EXPERIMENTAL The timeout feature is experimental.

Source
lock_write
Source
lock_write(timeout : Time::Span, &) : Bool

EXPERIMENTAL The timeout feature is experimental.

Source
lock_write
Source
unlock_read
Source
unlock_write
Source