bug? or my bad use of threads part 2
Aaron J. Seigo
aseigo at kde.org
Tue Sep 15 20:43:18 CEST 2009
On September 15, 2009, Amir Taaki wrote:
> Basically was having some trouble in my plugin so I've hacked this small
> testcase. It consists of one threaded object writing to an image read by
> the main Plasma Wallpaper object and drawn to the screen.
Tutorial1::Tutorial1(QObject *parent, const QVariantList &args)
: Plasma::Wallpaper(parent, args), mutex(new QMutex), blaa(parent,
mutex, &img)
{
img = NULL;
mutex = new QMutex;
you're assigning mutex twice, once in the ctor init list and once in the body
of the ctor.
that means that Tutorial1 and Blaa are using separate mutexes, which defeats
the purpose of having one ;)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090915/3920e415/attachment.sig
More information about the Plasma-devel
mailing list