A lock box object provides protected read / write access to a shared object that may be accessed concurrently by multiple threads.

Namespace:  Gallio.Common.Concurrency
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public class LockBox<T>
Visual Basic (Declaration)
Public Class LockBox(Of T)

Type Parameters

T
The type of object inside the lock box.

Remarks

Clients are expected to use the Read(ReadAction<(Of <(T>)>)) and Write(WriteAction<(Of <(T>)>)) methods to acquire and release a lock of the appropriate type prior to manipulating the contents.

Inheritance Hierarchy

System..::.Object
  Gallio.Common.Concurrency..::.LockBox<(Of <(T>)>)

See Also