[Qt-interest] Multiple up/down with QSemaphore

Thiago Macieira thiago at kde.org
Wed Apr 6 03:00:52 CEST 2011


On Tuesday, 5 de April de 2011 21:45:50 DiogoLR wrote:
> Thiago,
> 
> I understand what you say... Another way that I'm thinking is to protect the
> "acquire" sequence with a mutex. But Qt don't have any method to do what
> semop does?

If you're going to protect the acquiring with a mutex, then you don't need the 
semaphores. Just use the mutex and a bunch of booleans or integers.

-- 
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: 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/20110405/6ae6970a/attachment.bin 


More information about the Qt-interest-old mailing list