public void Unlock() { if (LockCounter <= 0) return; if (LockCounter == 1) { Flush(); } LockCounter--; }