File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ namespace PowerThreadPool
1818{
1919 internal class Worker : IDisposable
2020 {
21- private StatusPingPongChecker _statusPingPongChecker = new StatusPingPongChecker ( 10 ) ;
21+ private StatusPingPongChecker _statusPingPongChecker = new StatusPingPongChecker ( ) ;
2222
2323 internal InterlockedFlag < CanDispose > CanDispose { get ; } = Constants . CanDispose . Allowed ;
2424 internal InterlockedFlag < CanForceStop > CanForceStop { get ; } = Constants . CanForceStop . Allowed ;
Original file line number Diff line number Diff line change @@ -7,17 +7,15 @@ internal class StatusPingPongChecker
77 private int _pingPongThresholdDivisor = 20000 ;
88 private Stopwatch _timeSinceLastIdle = new Stopwatch ( ) ;
99 private Stopwatch _spinWatch = new Stopwatch ( ) ;
10- private HitChecker _hitChecker ;
10+ private HitChecker _hitChecker = new HitChecker ( 10 ) ;
1111 private long _statusPingPongThresholdTicks ;
1212
1313 internal bool HasPingedPong { get ; set ; }
1414
1515 internal bool CanSpin => _spinWatch . ElapsedTicks < _statusPingPongThresholdTicks ;
1616
17- internal StatusPingPongChecker ( int hitCount )
17+ internal StatusPingPongChecker ( )
1818 {
19- _hitChecker = new HitChecker ( hitCount ) ;
20-
2119 _timeSinceLastIdle . Start ( ) ;
2220 _statusPingPongThresholdTicks = Stopwatch . Frequency / _pingPongThresholdDivisor ;
2321 }
You can’t perform that action at this time.
0 commit comments