Re: [GD-Windows] Array foreach in scripting languages
Brought to you by:
vexxed72
From: Richard F. <ra...@de...> - 2006-08-13 20:39:43
|
On 8/13/06, Carsten Orthbandt <car...@se...> wrote: > > I'm afraid I wasn't clear. The actual data structure of the list > or array may be anything. In the case at hand, it is not a linked > list. for the sake of one word difference ;) "but you could always attach the iterators to the linked list on iterator construction." "but you could always attach the iterators to a linked list on iterator construction." hehe The linked list I was referring to would be a linked list > of all iterators attached to a specific array instance specifically > for adjusting the iterators on list changes. So yes, that's what > I was about to do. yes, this is what we do. Modifying arrays poses some serious challenges for multi-threaded > operation anyway, I don't think it's getting much harder with this > iterator scheme in place. I was planning to do heavy multi-threading > through thread pools and task lists that operate in higher level > chunks as to not spend to much time on the threading itself. My impression of working multi-threaded has been that we have to stop hoping, and start proactivley ensuring. I agree with Mat Noguchi, we should really dissallow the modification of any containers contents while we are iterating them. We used to do it this way in our scheduler, and may return to it once we start fulltime development on the next gen platforms. -- fabs(); |