protected ResourceLockDelegator(ResourceLock resLock, ResourceLockOptions resourceLockOptions) : base(resourceLockOptions) { Contract.Requires(resLock != null); Contract.Ensures(InnerLock != null); m_resLock = resLock; #if DEADLOCK_DETECTION m_resLock.ImmuneFromDeadlockDetection = true; // The outerlock is used for deadlock detection; not the inner lock #endif Contract.Assert(m_resLock != null); }
public ResourceLockOptionsHelper(ResourceLockOptions options) { m_options = options; }
protected ResourceLock(ResourceLockOptions resourceLockOptions) { m_resourceLockOptions = resourceLockOptions; InitConditionalVariableSupport(); }
/// <summary>Constructs a ResourceLockModifier object.</summary> /// <param name="resLock">Identifies the inner ResourceLock object.</param> /// <param name="resourceLockOptions">Identifies the flags associted with the innter ResourceLock object.</param> protected ResourceLockModifier(ResourceLock resLock, ResourceLockOptions resourceLockOptions) : base(resLock, resourceLockOptions) { Contract.Requires(resLock != null); }
public ThreadBlockInfo(Object lockObject, ResourceLockOptions lockFlags) : this(lockObject, 0) { m_lockFlags = new ResourceLockOptionsHelper(lockFlags); }
// Called by a thread when it is about to wait on a lock private IDisposable BlockForLockI(Object lockObject, ResourceLockOptions resourceLockOptions) { // Create record indicating what the calling thread is waiting on and add to waiting threads list BlockThreadAndCheckDeadlock(new ThreadBlockInfo(lockObject, resourceLockOptions)); return m_UnblockDueToLockAcquireDisposer; }
public static IDisposable BlockForLock(Object lockObject, ResourceLockOptions resourceLockOptions) { return s_deadlockDetector.BlockForLockI(lockObject, resourceLockOptions); }
// Called by a thread when it is about to wait on a lock private IDisposable BlockForLockI(Object lockObject, ResourceLockOptions resourceLockOptions) { // Create record indicating what the calling thread is waiting on and add to waiting threads list BlockThreadAndCheckDeadlock(new ThreadBlockInfo(lockObject, resourceLockOptions)); return(m_UnblockDueToLockAcquireDisposer); }
public static IDisposable BlockForLock(Object lockObject, ResourceLockOptions resourceLockOptions) { return(s_deadlockDetector.BlockForLockI(lockObject, resourceLockOptions)); }