private void _doWritePendingCmds()
{
int groupSize;
double groupDuration;
DateTime curFirstWaiter;
ManualResetEvent wakeUpThreads = null;
groupSize = numWaiters;
curFirstWaiter = firstWaiter;
finishedLWSN = log_handler.flushPending();
wakeUpThreads = this.groupCommitRequestorsHndl;
this.groupCommitRequestorsHndl = new ManualResetEvent(false);
numWaiters = 0;
firstWaiter = DateTime.MinValue;
// reset the group commit waiting machinery
if (wakeUpThreads != null) {
groupDuration = (DateTime.Now - curFirstWaiter).TotalMilliseconds;
wakeUpThreads.Set();
}
#if false
// debug output....
if (groupSize > 2) {
System.Console.WriteLine("group commit {0}, longest wait {1} ms",
groupSize, groupDuration);
}
#endif
}