[Qt-interest] Documentation on Mutex, Semaphore and Critical Section with Qt?
Arnold Krille
arnold at arnoldarts.de
Fri Jan 29 16:07:14 CET 2010
On Friday 29 January 2010 15:33:50 Matthias Pospiech wrote:
> I do not see the difference between QReadWriteLock and a combination of
> QWriteLocker and QReadLocker,
> especially because in your approach it would be two different lockers
> which have nothing to do with each other?
No, the Lockers are just convenience objects to lock the mutex/lock on
creation and automatically unlock them on deletion. That is regardless where
your functions exits, as soon as the locker goes out-of-scope, the mutex is
unlocked. Very handy for functions with multiple exit-points.
Arnold
-------------- 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://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100129/0d1aee4a/attachment.bin
More information about the Qt-interest-old
mailing list