Skip to content

Commit

Permalink
Fixing break after merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc committed Sep 18, 2019
1 parent 4ef03bb commit ce31917
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
22 changes: 0 additions & 22 deletions cs/src/core/Epochs/LightEpoch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,28 +227,6 @@ public void Resume()
ProtectAndDrain();
}

/// <summary>
/// Thread suspends its epoch entry
/// </summary>
public void Suspend()
{
int entry = threadEntryIndex.Value;
(*(tableAligned + entry)).localCurrentEpoch = int.MaxValue;
}

/// <summary>
/// Thread resumes its epoch entry
/// </summary>
public void Resume()
{
if (!threadEntryIndex.IsInitializedForThread || threadEntryIndex.Value == kInvalidIndex)
{
Acquire();
}
}

internal FastThreadLocal<int> ThreadEntry => threadEntryIndex;

/// <summary>
/// Increment global current epoch
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion cs/src/core/Index/FasterLog/FasterLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public unsafe long Append(List<byte[]> 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)
{
Expand Down

0 comments on commit ce31917

Please sign in to comment.