namespace Unosquare.Swan.Abstractions
{
using System;
///
/// Defines a generic interface for synchronized locking mechanisms.
///
public interface ISyncLocker : IDisposable
{
///
/// Acquires a writer lock.
/// The lock is released when the returned locking object is disposed.
///
/// A disposable locking object.
IDisposable AcquireWriterLock();
///
/// Acquires a reader lock.
/// The lock is released when the returned locking object is disposed.
///
/// A disposable locking object.
IDisposable AcquireReaderLock();
}
}