![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Iterator loop where list being iterated changes in diff thread? Topic Summary: I am having crashes due to corrupted iterator Created On: 15-Oct-2008 19:15 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
A question:
I have two active classes (instances run in their own threads). Call these classes A and B. One instance of each is running, and A can have 0-many Bs, so A has an ItsB. The instance of class A, in thread 1, makes a call to a method of the instance of Class B. So that method code is running in thread 1. That call ends up sending an event to the instance if class B. That event will send class B to its termination node (T). Class A, right after making that call, tries to increment his itsB iterator. ++itsB; Sometimes, this results in a crash. So, what it feels like to me, is the method running in thead 1 generates the event to class B. Class B somehow gets priority and terminates itself, and this the itsB interator in A is corrupt? How do I handle this? I always seem to have problems with iterators when entries and up deleted. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.