Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

TSimpleRWSync

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

Read/Write synchronizing object.

Declaration

Source position: systhrdh.inc line 27

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

  

Read/Write synchronizing object.

|

TObject,IReadWriteSync

  

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: Nov 23 2024