Files
dmex b02427417c PH1.x: fixed build
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5614 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2014-02-25 23:14:38 +00:00

42 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace ProcessHacker.Common.Threading
{
public interface IResourceLock
{
/// <summary>
/// Acquires the lock in exclusive mode, blocking if necessary.
/// </summary>
void AcquireExclusive();
/// <summary>
/// Acquires the lock in shared mode, blocking if necessary.
/// </summary>
void AcquireShared();
/// <summary>
/// Releases the lock in exclusive mode.
/// </summary>
void ReleaseExclusive();
/// <summary>
/// Releases the lock in shared mode.
/// </summary>
void ReleaseShared();
/// <summary>
/// Attempts to acquire the lock in exclusive mode.
/// </summary>
/// <returns>Whether the lock was acquired.</returns>
bool TryAcquireExclusive();
/// <summary>
/// Attempts to acquire the lock in shared mode.
/// </summary>
/// <returns>Whether the lock was acquired.</returns>
bool TryAcquireShared();
}
}