Module shared

Source
Expand description

This module implements a shared file with access controlled by an “advisory lock”. It allows multiple read access while restricts write access to a single actor at any given time.

This lock can be used to coordinate access to the file but should not be used as a mean to guarantee security restrictions to t

Structs§

DefaultSharedFileLockNameBuilder
This is the default implementation of the SharedFileLockNameBuilder.
SharedDirectory
This struct implements an “advisory lock” of a directory by using an auxiliary lock file to control the shared read access to it.
SharedDirectoryReadLockGuard
An RAII implementation of an “advisory lock” of a shared read to the protected directory. When this structure is dropped (falls out of scope), the shared read lock is released.
SharedDirectoryWriteLockGuard
An RAII implementation of an “advisory lock” of a exclusive read and write to the protected directory. When this structure is dropped (falls out of scope), the shared read lock is released.
SharedFile
This struct implements an “advisory lock” of a file using an auxiliary lock file to control the shared read access to the file as well as an exclusive read and write access to it.
SharedFileReadLockGuard
An RAII implementation of an “advisory lock” of a shared read to the protected file. When this structure is dropped (falls out of scope), the shared read lock is released.
SharedFileWriteLockGuard
An RAII implementation of an “advisory lock” of a exclusive read and write to the protected file. When this structure is dropped (falls out of scope), the shared read lock is released.

Traits§

SharedFileLockNameBuilder