public void Commit() { lock (_lockObject) { while (_preCommitQueue.Count > 0) { _postCommitQueue.Put(_preCommitQueue.Dequeue()); } } }