Click or drag to resize

TimedLock Structure

This class is by Ian Griffiths, see: http://www.interact-sw.co.uk/iangblog/2004/04/26/yetmoretimedlocking [FB]Comment below is by Ian as well. Class is left as-is with very minor changes in comments and code placement. Thanks to Eric Gunnerson for recommending this be a struct rather than a class - avoids a heap allocation. Thanks to Change Gillespie and Jocelyn Coulmance for pointing out the bugs that then crept in when I changed it to use struct... Thanks to John Sands for providing the necessary incentive to make me invent a way of using a struct in both release and debug builds without losing the debug leak tracking.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.7.0.0 (5.7.0)
Syntax
public struct TimedLock : IDisposable

The TimedLock type exposes the following members.

Methods
  NameDescription
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public methodGetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberLock(Object)
Locks the specified o.
Public methodStatic memberLock(Object, TimeSpan)
Locks the specified o.
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Top
See Also