Skip to content

TSimpleRWSync

Read/Write synchronizing object.

Declaration

Source position: systhrdh.inc line 27

type

  TSimpleRWSync = class(TInterfacedObject, IReadWriteSync)
  public
    constructor Create;
    destructor Destroy;
    function Beginwrite : Boolean;
    procedure Endwrite;
    procedure Beginread;
    procedure Endread;
  end;

Description

TSimpleRWSync implements a simple read/write locking mechanism. It controls access to an object: only a single thread is allowed access to an object for either read or write operations.

Access is controlled through a single critical section.

Methods

Member Visibility Description
Beginread public Acquire a read lock.
Beginwrite public Acquire a write lock.
Create public Create a new instance of TSimpleRWSync.
Destroy public Removes the TSimpleRWSync instance from memory.
Endread public Release the read lock.
Endwrite public Release the write lock.
See all Methods

See also

Name Description
TMultiReadExclusiveWriteSynchronizer Standard implementation of a IReadWriteSync interface.