private void MutilExecute() { var spinWait = SpinWaitUtils.GetSpinWait(); MutilExecute <int, CreateSnapshotTask> mutilExecute = new MutilExecute <int, CreateSnapshotTask>(SharedConfig.CreateSnapshotThreadCount, snapshotSendTasks, CreateSendSnapshot); mutilExecute.Start(); try { SendSnapshotWait.BeginProfile(); while (!mutilExecute.IsDone()) { _logger.DebugFormat("SendSnapshot ThreadsRunning;{0}", mutilExecute.ThreadsRunning); spinWait.SpinOnce(); } } finally { SendSnapshotWait.EndProfile(); } }
private void MutilExecute() { var spinWait = SpinWaitUtils.GetSpinWait(); MutilExecute <int, CreateSnapshotParams> mutilExecute = new MutilExecute <int, CreateSnapshotParams>(SharedConfig.CreateSnapshotThreadCount, _sendSnapshotTasks, CreateSendSnapshot); mutilExecute.Start(); try { SingletonManager.Get <DurationHelp>().ProfileStart(CustomProfilerStep.SendSnapshotWait); while (!mutilExecute.IsDone()) { _logger.DebugFormat("SendSnapshot ThreadsRunning;{0}", mutilExecute.ThreadsRunning); spinWait.SpinOnce(); } } finally { SingletonManager.Get <DurationHelp>().ProfileEnd(CustomProfilerStep.SendSnapshotWait); } }