Amnesia.SessionTracker.ParallelDependentActivityCompleted C# (CSharp) Method

ParallelDependentActivityCompleted() public method

Called by the thread that is initiating a parallel activity to indicate that all threads should be completed.
public ParallelDependentActivityCompleted ( ) : void
return void
        public void ParallelDependentActivityCompleted()
        {
            lock (fieldsLock)
            {
                ActivityInfo activity = CurrentThreadActivity;
                --activity.ThreadCount;

                if (activity.ThreadCount != 1)
                    throw new ApplicationException("Some threads that were part of an Amnesia parallel activity did not report back thay they have completed their work but should have.");
            }
        }