Skip to content

Commit

Permalink
Add ++ operator to SyncedCounter
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Dec 8, 2023
1 parent d4db07b commit c87f46a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Core/Cleipnir.ResilientFunctions.Tests/Utils/SyncedCounter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ public int Increment()
lock (_sync)
return _current++;
}

public static SyncedCounter operator ++(SyncedCounter counter)
{
counter.Increment();
return counter;
}
}

0 comments on commit c87f46a

Please sign in to comment.