public BpsShare(BpsLimiter limiter) { this.limiter = limiter; lock (limiter) { limiter.threads++; } }
public void Dispose() { if (limiter != null) { lock (limiter) { limiter.threads--; } limiter = null; } }