Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
filipnavara committed Feb 5, 2019
1 parent 0c4325e commit f214638
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ internal partial class LowLevelLifoSemaphore : IDisposable

public LowLevelLifoSemaphore(int initialSignalCount, int maximumSignalCount)
{
Debug.Assert(initialSignalCount > 0);
Debug.Assert(initialSignalCount >= 0);
Debug.Assert(initialSignalCount <= maximumSignalCount);

_counts = new Counts { _signalCount = (uint)initialSignalCount };
Expand All @@ -42,7 +42,7 @@ public bool Wait(int timeoutMs)
Counts counts = Counts.VolatileRead(ref _counts);
while (true)
{
Debug.Assert(counts._signalCount < _maximumSignalCount);
Debug.Assert(counts._signalCount <= _maximumSignalCount);
Counts newCounts = counts;

if (counts._signalCount != 0)
Expand Down

0 comments on commit f214638

Please sign in to comment.