Class Lock.With<T>
Utility class for executing code with exclusive access.
Inheritance
System.Object
Lock.With<T>
Assembly: DistributedLucene.Net.dll
Syntax
public abstract class With<T> : object
Type Parameters
Name | Description |
---|---|
T |
Constructors
Name | Description |
---|---|
With(Lock, Int64) | Constructs an executor that will grab the named |
Methods
Name | Description |
---|---|
DoBody() | Code to execute with exclusive access. |
Run() | Calls DoBody() while lock is obtained. Blocks if lock cannot be obtained immediately. Retries to obtain lock once per second until it is obtained, or until it has tried ten times. Lock is released when DoBody() exits. |