[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'sysutils' (#rtl)

TSimpleRWSync

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Read/Write synchronizing object.

Declaration

Source position: systhrdh.inc line 26

type TSimpleRWSync = class(TInterfacedObject, IReadWriteSync)

public

  constructor Create; virtual;

  

Create a new instance of TSimpleRWSync

  destructor Destroy; override;

  

Removes the TSimpleRWSync instance from memory

  function Beginwrite;

  

Acquire a write lock

  procedure Endwrite;

  

Release the write lock

  procedure Beginread;

  

Acquire a read lock

  procedure Endread;

  

Release the read lock

end;

Inheritance

TSimpleRWSync,IReadWriteSync

  

Read/Write synchronizing object.

|

TInterfacedObject,IUnknown

  

TObject descendent implementing the IUnknown interface

|

TObject

  

Base class of all classes.

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.

See also

TMultiReadExclusiveWriteSynchronizer

  

Standard implementation of a IReadWriteSync interface


Documentation generated on: Sep 28 2017