Re: A bug in forkedcontr.C

2003-02-25 Thread Angus Leeming
Alfredo Braunstein wrote: > Angus Leeming wrote: > >> No, I like your way. I just like explanations too. I'll make the change. > > Sorry if I was rude. I have searched this bug for a while. (it keeped > giving me "Timeout::start: already running" while loading images, and I > was convinced that

Re: A bug in forkedcontr.C

2003-02-25 Thread Alfredo Braunstein
Angus Leeming wrote: > No, I like your way. I just like explanations too. I'll make the change. Sorry if I was rude. I have searched this bug for a while. (it keeped giving me "Timeout::start: already running" while loading images, and I was convinced that it was LoaderQueue's timer: I have had t

Re: A bug in forkedcontr.C

2003-02-25 Thread Angus Leeming
Alfredo Braunstein wrote: > The problem is not the erase in timer(), but the erase in kill(). > > If want to do it this way, I think you will have to modify the kill() > method, making not to erase elements of the list, but to put them to zero. > > Or... why you don't like my way? Efficiency? No

Re: A bug in forkedcontr.C

2003-02-25 Thread Alfredo Braunstein
Hi Angus, Angus Leeming wrote: > Ooo, that's devious. In that case I think we really need a two pass > algorithm: > > ListType::iterator it = forkedCalls.begin(); > ListType::iterator end = forkedCalls.end(); > for (; it != end; ++it) { > bool remove_

Re: A bug in forkedcontr.C

2003-02-25 Thread Angus Leeming
Alfredo Braunstein wrote: > Angus Leeming wrote: > >> I don't see the bug. You return to the start of the list, I move to the >> next itme in the list. The 'prev' stuff is safe if ugly, as I understand >> list. > > Sorry, I was away. > What if for instance, *prev has dissapeared in the time bein

Re: A bug in forkedcontr.C

2003-02-25 Thread Alfredo Braunstein
Angus Leeming wrote: > I don't see the bug. You return to the start of the list, I move to the > next itme in the list. The 'prev' stuff is safe if ugly, as I understand > list. Sorry, I was away. What if for instance, *prev has dissapeared in the time being? (because of multiple calls to kill()

Re: A bug in forkedcontr.C

2003-02-25 Thread John Levon
On Tue, Feb 25, 2003 at 12:10:29PM +, Angus Leeming wrote: > while (it != end) { this is what I always do. It's a bit ugly, but I'm not all sure your code before is strictly allowed ... john

Re: A bug in forkedcontr.C

2003-02-25 Thread Angus Leeming
John Levon wrote: > On Tue, Feb 25, 2003 at 11:33:07AM +, Angus Leeming wrote: > >> > - ListType::iterator prev = it; >> > - --prev; >> > forkedCalls.erase(it); >> > - it = prev; >> >> I don't see the bu

Re: A bug in forkedcontr.C

2003-02-25 Thread John Levon
On Tue, Feb 25, 2003 at 11:33:07AM +, Angus Leeming wrote: > > - ListType::iterator prev = it; > > - --prev; > > forkedCalls.erase(it); > > - it = prev; > > I don't see the bug. You return to the start of

Re: A bug in forkedcontr.C

2003-02-25 Thread Angus Leeming
Alfredo Braunstein wrote: > I've added the explanation in a comment. > > --- forkedcontr.C 2003/02/13 16:53:14 1.7 > +++ forkedcontr.C 2003/02/25 10:26:02 > @@ -130,19 +130,19 @@ > } > > if (remove_it) { > - // Emit signal and

A bug in forkedcontr.C

2003-02-25 Thread Alfredo Braunstein
I've added the explanation in a comment. --- forkedcontr.C 2003/02/13 16:53:14 1.7 +++ forkedcontr.C 2003/02/25 10:26:02 @@ -130,19 +130,19 @@ } if (remove_it) { - // Emit signal and remove the item from the list -