internal void UpdateOperationCount(long delta) { long current, updated; do { current = this.pendingOperations; updated = current + delta; } while (current != Interlocked.CompareExchange(ref this.pendingOperations, updated, current)); }