qt-interest@trolltech.com
[Top] [All Lists]

Re: looking for threading advice

Subject: Re: looking for threading advice
From: "Dragos Manoilescu"
Date: Fri, 3 Mar 2006 15:06:47 -0500
Paul Miller wrote:
The problem is my Observers - they contain a cache of the processed result, and the UI will use this cache if it is valid. Obviously, changing the data invalidates the cache on all observers.


You could implement a notification mechanism so when the source of the processed result changes the observer will get notified. Now either remove the current object and create a new one or correct it. Also keep the consumer of the Observer object from processing the observer until not up to date.

Maybe sticking a Mutex on each Object to control access to the (reference-counted) data would be the trick. Then I can choose to remove obsolete jobs in the queue or cull them somehow - perhaps deleting the job from outside the queue could set a bit which tells the queue to ignore the job.

Can anyone recommend any good texts on threaded program design? One that focuses on Qt threading would be wonderful!

 I would also be interested in a QT threaded design book :)

 Regards,

Dragos
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>