Re: The image loader queue

2003-02-24 Thread Allan Rae
On Sat, 22 Feb 2003, Alfredo Braunstein wrote: > Allan Rae wrote: > > > A 20 second scan of the code in LoadQueue.C suggests that push_front() > > and pop_front() is the reason your queue is acting like a stack. > > > > Try pushing on one end and popping off the other. > > Sorry Allan, I've tried

Re: The image loader queue

2003-02-22 Thread Alfredo Braunstein
Allan Rae wrote: > A 20 second scan of the code in LoadQueue.C suggests that push_front() > and pop_front() is the reason your queue is acting like a stack. > > Try pushing on one end and popping off the other. Sorry Allan, I've tried to answer you by mail but with no luck. It is supposed to wor

Re: The image loader queue

2003-02-21 Thread Alfredo Braunstein
Angus Leeming wrote: > I've also added you to the CREDITS file; there's no escape now! > Iujuuu!... thanks. Alfredo

Re: The image loader queue

2003-02-21 Thread Angus Leeming
Alfredo Braunstein wrote: > Alfredo Braunstein wrote: > >> Ah, I see. A call to startLoading within LoadNext() can summon other >> redraws and end up in a touch(), maybe? In this case, the bucket is >> needed but not the locking. I will try this. > > And it works like a charm. I've tried to corr

Re: The image loader queue

2003-02-21 Thread Alfredo Braunstein
Alfredo Braunstein wrote: > Ah, I see. A call to startLoading within LoadNext() can summon other > redraws and end up in a touch(), maybe? In this case, the bucket is needed > but not the locking. I will try this. And it works like a charm. I've tried to correct also the withespace, and I'm attac

Re: The image loader queue

2003-02-21 Thread Alfredo Braunstein
John Levon wrote: > I don't quite follow what context is racing with what other context. > Remember the timer is based on a GUI implementation so can't "interrupt" > any straight-line code that doesn't go back to the event loop... Actually, there's something fishy going on. I've removed the bucke

Re: The image loader queue

2003-02-20 Thread Allan Rae
On Fri, 21 Feb 2003, Alfredo Braunstein wrote: > 1) I'm still investigating how to solve the startup problem. (images get > loaded in reverse order). Clues welcomed. A 20 second scan of the code in LoadQueue.C suggests that push_front() and pop_front() is the reason your queue is acting like a st

Re: The image loader queue

2003-02-20 Thread John Levon
On Fri, Feb 21, 2003 at 02:13:12AM +0100, Alfredo Braunstein wrote: > 2) I've changed bucket_ to a pointer, so to reduce the swapping time to one > operation (which is indeed threads-safe), because swap is defined as a > template: You know you can specialise this template, right ? I'm sure there

The image loader queue

2003-02-20 Thread Alfredo Braunstein
Here is what I've got. It work and seems to be fast. A few notes, though. 1) I'm still investigating how to solve the startup problem. (images get loaded in reverse order). Clues welcomed. 2) I've changed bucket_ to a pointer, so to reduce the swapping time to one operation (which is indeed thre