Skip to content

TMultiReadExclusiveWriteSynchronizer

Standard implementation of a IReadWriteSync interface.

Declaration

Source position: systhrdh.inc line 41

type

  TMultiReadExclusiveWriteSynchronizer = class(TInterfacedObject, IReadWriteSync)
  public
    constructor Create;
    destructor Destroy;
    function Beginwrite : Boolean;
    procedure Endwrite;
    procedure Beginread;
    procedure Endread;
    property RevisionLevel: Cardinal; {r}
    property WriterThreadID: TThreadID; {r}
  end;

Description

TMultiReadExclusiveWriteSynchronizer is a default implementation of the IReadWriteSync interface. It uses a single mutex to protect access to the read/write resource, resulting in a single thread having access to the resource.

Properties

Member Visibility Description
RevisionLevel read only public
WriterThreadID read only public
See all Properties

Methods

Member Visibility Description
Beginread public Request read access to the resource.
Beginwrite public Request write access to the resource.
Create public Create a new instance of the TMultiReadExclusiveWriteSynchronizer class.
Destroy public Destroys the TMultiReadExclusiveWriteSynchronizer instance.
Endread public Release read access to the resource.
Endwrite public Release write access to the resource.
See all Methods

See also

Name Description
IReadWriteSync Read/Write synchronizer.