Multiple QRegExp crashes when multithreading in KRunner
Thiago Macieira
thiago at kde.org
Fri Jan 14 00:17:24 GMT 2011
On Thursday, 13 de January de 2011 23:33:14 Milian Wolff wrote:
> Matthias Fuchs, 13.01.2011:
> > Hi,
> >
> > There are some crashes related to QRegExp and multithreading, so they
> > appear when using KRunner.
>
> QRegExp is not threadsafe, you either have to guard it with a mutex or make
> sure it's not shared between threads.
You're right.
To be clear: as per Qt terminology, QRegExp is reentrant, not thread-safe.
That means you can use QRegExp in different threads, at the same time, provided
that they point to different objects. If it's the same object, do as Milian
said.
It's easier to just create a copy in this case.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110114/947dc09b/attachment.sig>
More information about the kde-core-devel
mailing list