Permalink
Browse files

Added needed lock statements.

  • Loading branch information...
1 parent 2de6c1c commit 594d5b15f10dd5c2face31339893d7a350d344dd Ken Baltrinic committed Apr 1, 2011
Showing with 8 additions and 2 deletions.
  1. +8 −2 Rhino.Queues/Monitoring/TransactionalPerformanceCountersProvider.cs
View
10 Rhino.Queues/Monitoring/TransactionalPerformanceCountersProvider.cs
@@ -68,7 +68,10 @@ private class TransactionalOutboundPerformanceCounters : IOutboundPerfomanceCoun
public void CommittTo(IOutboundPerfomanceCounters counters)
{
- counters.UnsentMessages += UnsentMessages;
+ lock (counters)
+ {
+ counters.UnsentMessages += UnsentMessages;
+ }
}
}
@@ -78,7 +81,10 @@ private class TransactionalInboundPerformanceCounters : IInboundPerfomanceCounte
public void CommittTo(IInboundPerfomanceCounters counters)
{
- counters.ArrivedMessages += ArrivedMessages;
+ lock (counters)
+ {
+ counters.ArrivedMessages += ArrivedMessages;
+ }
}
}
}

0 comments on commit 594d5b1

Please sign in to comment.