From ce319178f02f4ab3bbecec452563144894d5aa02 Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Wed, 18 Sep 2019 15:56:43 -0700 Subject: [PATCH] Fixing break after merge. --- cs/src/core/Epochs/LightEpoch.cs | 22 ---------------------- cs/src/core/Index/FasterLog/FasterLog.cs | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/cs/src/core/Epochs/LightEpoch.cs b/cs/src/core/Epochs/LightEpoch.cs index b710b25b7..8434f8964 100644 --- a/cs/src/core/Epochs/LightEpoch.cs +++ b/cs/src/core/Epochs/LightEpoch.cs @@ -227,28 +227,6 @@ public void Resume() ProtectAndDrain(); } - /// - /// Thread suspends its epoch entry - /// - public void Suspend() - { - int entry = threadEntryIndex.Value; - (*(tableAligned + entry)).localCurrentEpoch = int.MaxValue; - } - - /// - /// Thread resumes its epoch entry - /// - public void Resume() - { - if (!threadEntryIndex.IsInitializedForThread || threadEntryIndex.Value == kInvalidIndex) - { - Acquire(); - } - } - - internal FastThreadLocal ThreadEntry => threadEntryIndex; - /// /// Increment global current epoch /// diff --git a/cs/src/core/Index/FasterLog/FasterLog.cs b/cs/src/core/Index/FasterLog/FasterLog.cs index 5435008ed..02b8cd4a6 100644 --- a/cs/src/core/Index/FasterLog/FasterLog.cs +++ b/cs/src/core/Index/FasterLog/FasterLog.cs @@ -120,7 +120,7 @@ public unsafe long Append(List entries) public long Flush(bool spinWait = false) { epoch.Resume(); - allocator.ShiftReadOnlyToTail(out long tailAddress); + allocator.ShiftReadOnlyToTail(out long tailAddress, out SemaphoreSlim _); epoch.Suspend(); if (spinWait) {