[Qt-interest] QAtomicInt and QThread

Thiago Macieira thiago at kde.org
Fri Jun 24 17:47:23 CEST 2011


Em Friday, 24 de June de 2011, às 11:52:24, Arnold Krille escreveu:
> On Friday 24 June 2011 11:38:31 Thiago Macieira wrote:
> > I see some manipulation of a non-atomic 64-bit int inside a loop and
> > reading of the same 64-bit integer from another function. Since you didn't
> > try to use the atomic there, I don't suppose you care that this is
> > non-atomic and can produce weird results.
> 
> Maybe thats because a 64bit integer is needed here but QAtomicInt is only
> 32bit?

There's a reason why QAtomicInt is 32-bit.

> I had that problem in my software and "solved" it by copying the QAtomicInt
> sources into my code-tree to create a QAtomicInt64...

Only works on a 64-bit platform.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110624/3a2fdc0f/attachment.bin 


More information about the Qt-interest-old mailing list