From 18da561327d305ff87f9ef47e0aa07a8af4a8042 Mon Sep 17 00:00:00 2001 From: James Watson Date: Thu, 17 Aug 2017 12:46:32 +0100 Subject: [PATCH] add NoOpLock --- src/Adaptive.Agrona/Adaptive.Agrona.csproj | 1 + src/Adaptive.Agrona/Concurrent/NoOpLock.cs | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/Adaptive.Agrona/Concurrent/NoOpLock.cs diff --git a/src/Adaptive.Agrona/Adaptive.Agrona.csproj b/src/Adaptive.Agrona/Adaptive.Agrona.csproj index 45c1d1ca..50d30752 100644 --- a/src/Adaptive.Agrona/Adaptive.Agrona.csproj +++ b/src/Adaptive.Agrona/Adaptive.Agrona.csproj @@ -127,6 +127,7 @@ + diff --git a/src/Adaptive.Agrona/Concurrent/NoOpLock.cs b/src/Adaptive.Agrona/Concurrent/NoOpLock.cs new file mode 100644 index 00000000..1bb5ee34 --- /dev/null +++ b/src/Adaptive.Agrona/Concurrent/NoOpLock.cs @@ -0,0 +1,18 @@ +namespace Adaptive.Agrona.Concurrent +{ + public class NoOpLock : ILock + { + public void Lock() + { + } + + public void Unlock() + { + } + + public bool TryLock() + { + return true; + } + } +}