Audacity  2.2.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BlockFile::ReadLock Class Reference

#include <BlockFile.h>

Inheritance diagram for BlockFile::ReadLock:

Public Types

using Suspension = std::unique_ptr< const BlockFile, ReadLocker >

Public Member Functions

 ReadLock (ReadLock &&that)
Suspension Suspend () const

Private Member Functions

 ReadLock (const BlockFile *p, const BlockFile::ReadUnlocker &u)

Private Attributes

friend BlockFile

Detailed Description

Definition at line 186 of file BlockFile.h.

Member Typedef Documentation

using BlockFile::ReadLock::Suspension = std::unique_ptr< const BlockFile, ReadLocker >

Definition at line 193 of file BlockFile.h.

Constructor & Destructor Documentation

BlockFile::ReadLock::ReadLock ( const BlockFile p,
const BlockFile::ReadUnlocker u 

Definition at line 189 of file BlockFile.h.

190  : ReadLockBase { p, u } {}
std::unique_ptr< const BlockFile, ReadUnlocker > ReadLockBase
Definition: BlockFile.h:183
BlockFile::ReadLock::ReadLock ( ReadLock &&  that)

Definition at line 192 of file BlockFile.h.

192 : ReadLockBase{ std::move(that) } {}
std::unique_ptr< const BlockFile, ReadUnlocker > ReadLockBase
Definition: BlockFile.h:183

Member Function Documentation

Suspension BlockFile::ReadLock::Suspend ( ) const

Definition at line 194 of file BlockFile.h.

195  { if (get()) get()->UnlockRead();
196  return Suspension{ get(), ReadLocker{} }; }
virtual void UnlockRead() const
Allows reading on other threads.
Definition: BlockFile.h:176
std::unique_ptr< const BlockFile, ReadLocker > Suspension
Definition: BlockFile.h:193

Member Data Documentation

friend BlockFile::ReadLock::BlockFile

Definition at line 188 of file BlockFile.h.

The documentation for this class was generated from the following file: