Тема: Мультипотоковість
Є в мене ділянка коду, яку я хочу розпаралелити (зараз вона працює правильно)
LinkedListNode<Homosapien> current = population.First;
            LinkedListNode<Homosapien> next;
            
            while (current != null)
            {
                next = current.Next;
                current.Value.MakeStep(
                        GetMatrixConversion(current.Value.Age.Year,
                                            today.Month));                
                current = next;
            }Додаткова інформація: MakeStep іноді викидує подію, що current помер, тоді він видаляється зі списку:
        public void MakeStep(double[][] Prob)
        {
            if (hystori.Last.Value.state == State.Dead)
                throw new InvalidOperationException("Individ is dead");
            State newState = (State)(GetRandIndex(Prob[(int)hystori.Last.Value.state]));
            if (newState != hystori.Last.Value.state)
            {
                hystori.AddLast(new Record(newState, today));
            }
            today.MoveNext();
            age.MoveNext();
            
            if (newState != State.Dead)
            {
                CanBorn();
            }
            else
            {
                RaiseImDie();
            }
        }Розбив список, припустимо, на 4 частини, кожну пустив у потік, викинуло помилку, мов я оброблюю мертвого індивіда... Ні, проблема не в тому, що я покаліцьки розбив список, бо наступний код викидує ту ж помилку
            while (current != null)
            {
                next = current.Next;
                Task.Factory.StartNew(() =>
                {
                    current.Value.MakeStep(
                        GetMatrixConversion(current.Value.Age.Year,
                                            today.Month));
                });
                current = next;
            }Питання - якого дива два потоки заходять в один об'єкт, коли я їм не кажу цього робити?