Skip to content

Commit

Permalink
removed checked in managedesent.dll and made it to use Nuget package.
Browse files Browse the repository at this point in the history
this also moves managedesent.dll to a newer version that has a guard to an issue in esent.dll which time to time crash VS. (changeset 1397816)
  • Loading branch information
heejaechang committed Jan 14, 2015
1 parent 5453c1d commit e7aa393
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ public void Dispose()
public void AddRefUnsafe()
{
Contract.Requires(refCounter >= 0);
refCounter++;
Interlocked.Increment(ref refCounter);
}

/// <summary>
/// caller should make sure this is called in a thread-safe way
/// </summary>
public bool ReleaseRefUnsafe()
{
refCounter--;
var changedValue = Interlocked.Decrement(ref refCounter);

Contract.Requires(refCounter >= 0);
return refCounter == 0;
Contract.Requires(changedValue >= 0);
return changedValue == 0;
}

public virtual void Close()
Expand Down

0 comments on commit e7aa393

Please sign in to comment.