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.");
}
}